From db7845385ae5ed3314ae8e99211ab80fae35aef6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 17 May 2024 18:59:03 +0000 Subject: [PATCH 1/2] feat: add `generative_summary` and `area_summary` for place summaries feat: add `contextual_contents` field for contextual search results docs: `included_primary_types` supports type collections `(regions)` and `(cities)` Introduces Place summaries and Contextual Search Results features. PiperOrigin-RevId: 634816526 Source-Link: https://github.com/googleapis/googleapis/commit/badabdc603da74644f379ab4a5a35cb34eac1a27 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bec34dc87380c27a7271a4d4f9ebedf84e81f831 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJiZWMzNGRjODczODBjMjdhNzI3MWE0ZDRmOWViZWRmODRlODFmODMxIn0= --- .../google-maps-places/v1/.eslintignore | 7 + .../google-maps-places/v1/.eslintrc.json | 3 + .../google-maps-places/v1/.gitignore | 14 + .../google-maps-places/v1/.jsdoc.js | 55 + .../google-maps-places/v1/.mocharc.js | 33 + .../google-maps-places/v1/.prettierrc.js | 22 + .../google-maps-places/v1/README.md | 1 + .../google-maps-places/v1/package.json | 58 + .../v1/protos/google/geo/type/viewport.proto | 69 + .../google/maps/places/v1/attribution.proto | 44 + .../google/maps/places/v1/content_block.proto | 45 + .../maps/places/v1/contextual_content.proto | 120 + .../google/maps/places/v1/ev_charging.proto | 111 + .../google/maps/places/v1/fuel_options.proto | 109 + .../google/maps/places/v1/geometry.proto | 42 + .../protos/google/maps/places/v1/photo.proto | 54 + .../protos/google/maps/places/v1/place.proto | 584 + .../maps/places/v1/places_service.proto | 772 + .../google/maps/places/v1/reference.proto | 45 + .../protos/google/maps/places/v1/review.proto | 65 + .../google-maps-places/v1/protos/protos.d.ts | 13421 ++++++ .../google-maps-places/v1/protos/protos.js | 36611 ++++++++++++++++ .../google-maps-places/v1/protos/protos.json | 3848 ++ .../v1/places.autocomplete_places.js | 151 + .../generated/v1/places.get_photo_media.js | 99 + .../samples/generated/v1/places.get_place.js | 104 + .../generated/v1/places.search_nearby.js | 160 + .../generated/v1/places.search_text.js | 137 + ...nippet_metadata_google.maps.places.v1.json | 359 + .../google-maps-places/v1/src/index.ts | 25 + .../v1/src/v1/gapic_metadata.json | 73 + .../google-maps-places/v1/src/v1/index.ts | 19 + .../v1/src/v1/places_client.ts | 1135 + .../v1/src/v1/places_client_config.json | 46 + .../v1/src/v1/places_proto_list.json | 14 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_places_v1.ts | 802 + .../google-maps-places/v1/tsconfig.json | 19 + .../google-maps-places/v1/webpack.config.js | 64 + 41 files changed, 59448 insertions(+) create mode 100644 owl-bot-staging/google-maps-places/v1/.eslintignore create mode 100644 owl-bot-staging/google-maps-places/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-maps-places/v1/.gitignore create mode 100644 owl-bot-staging/google-maps-places/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-maps-places/v1/.mocharc.js create mode 100644 owl-bot-staging/google-maps-places/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-maps-places/v1/README.md create mode 100644 owl-bot-staging/google-maps-places/v1/package.json create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto create mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.js create mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.json create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js create mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json create mode 100644 owl-bot-staging/google-maps-places/v1/src/index.ts create mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts create mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json create mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json create mode 100644 owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-maps-places/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts create mode 100644 owl-bot-staging/google-maps-places/v1/tsconfig.json create mode 100644 owl-bot-staging/google-maps-places/v1/webpack.config.js diff --git a/owl-bot-staging/google-maps-places/v1/.eslintignore b/owl-bot-staging/google-maps-places/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-maps-places/v1/.eslintrc.json b/owl-bot-staging/google-maps-places/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-maps-places/v1/.gitignore b/owl-bot-staging/google-maps-places/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-maps-places/v1/.jsdoc.js b/owl-bot-staging/google-maps-places/v1/.jsdoc.js new file mode 100644 index 00000000000..acb85480da6 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@googlemaps/places', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-maps-places/v1/.mocharc.js b/owl-bot-staging/google-maps-places/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-maps-places/v1/.prettierrc.js b/owl-bot-staging/google-maps-places/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/owl-bot-staging/google-maps-places/v1/README.md b/owl-bot-staging/google-maps-places/v1/README.md new file mode 100644 index 00000000000..0e091236257 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/README.md @@ -0,0 +1 @@ +Places: Nodejs Client diff --git a/owl-bot-staging/google-maps-places/v1/package.json b/owl-bot-staging/google-maps-places/v1/package.json new file mode 100644 index 00000000000..f61e3b41190 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@googlemaps/places", + "version": "0.1.0", + "description": "Places client for Node.js", + "repository": "googleapis/nodejs-places", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google places", + "places", + "places" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.3" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto b/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto new file mode 100644 index 00000000000..df68a324055 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.geo.type; + +import "google/type/latlng.proto"; + +option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport"; +option java_multiple_files = true; +option java_outer_classname = "ViewportProto"; +option java_package = "com.google.geo.type"; +option objc_class_prefix = "GGTP"; + +// A latitude-longitude viewport, represented as two diagonally opposite `low` +// and `high` points. A viewport is considered a closed region, i.e. it includes +// its boundary. The latitude bounds must range between -90 to 90 degrees +// inclusive, and the longitude bounds must range between -180 to 180 degrees +// inclusive. Various cases include: +// +// - If `low` = `high`, the viewport consists of that single point. +// +// - If `low.longitude` > `high.longitude`, the longitude range is inverted +// (the viewport crosses the 180 degree longitude line). +// +// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, +// the viewport includes all longitudes. +// +// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, +// the longitude range is empty. +// +// - If `low.latitude` > `high.latitude`, the latitude range is empty. +// +// Both `low` and `high` must be populated, and the represented box cannot be +// empty (as specified by the definitions above). An empty viewport will result +// in an error. +// +// For example, this viewport fully encloses New York City: +// +// { +// "low": { +// "latitude": 40.477398, +// "longitude": -74.259087 +// }, +// "high": { +// "latitude": 40.91618, +// "longitude": -73.70018 +// } +// } +message Viewport { + // Required. The low point of the viewport. + google.type.LatLng low = 1; + + // Required. The high point of the viewport. + google.type.LatLng high = 2; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto new file mode 100644 index 00000000000..481ce202499 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "AttributionProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Information about the author of the UGC data. Used in +// [Photo][google.maps.places.v1.Photo], and +// [Review][google.maps.places.v1.Review]. +message AuthorAttribution { + // Name of the author of the [Photo][google.maps.places.v1.Photo] or + // [Review][google.maps.places.v1.Review]. + string display_name = 1; + + // URI of the author of the [Photo][google.maps.places.v1.Photo] or + // [Review][google.maps.places.v1.Review]. + string uri = 2; + + // Profile photo URI of the author of the + // [Photo][google.maps.places.v1.Photo] or + // [Review][google.maps.places.v1.Review]. + string photo_uri = 3; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto new file mode 100644 index 00000000000..1a2352f26b6 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/maps/places/v1/reference.proto"; +import "google/type/localized_text.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "ContentBlockProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// A block of content that can be served individually. +message ContentBlock { + // The topic of the content, for example "overview" or "restaurant". + string topic = 1; + + // Content related to the topic. + google.type.LocalizedText content = 2; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // References that are related to this block of content. + References references = 3; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto new file mode 100644 index 00000000000..a732e91e392 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto @@ -0,0 +1,120 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/maps/places/v1/photo.proto"; +import "google/maps/places/v1/review.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "ContextualContentProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Experimental: See +// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative +// for more details. +// +// Content that is contextual to the place query. +message ContextualContent { + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // Justifications for the place. Justifications answers the question of why a + // place could interest an end user. + message Justification { + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // User review justifications. This highlights a section of the user review + // that would interest an end user. For instance, if the search query is + // "firewood pizza", the review justification highlights the text relevant + // to the search query. + message ReviewJustification { + // The text highlighted by the justification. This is a subset of the + // review itself. The exact word to highlight is marked by the + // HighlightedTextRange. There could be several words in the text being + // highlighted. + message HighlightedText { + // The range of highlighted text. + message HighlightedTextRange { + int32 start_index = 1; + + int32 end_index = 2; + } + + string text = 1; + + // The list of the ranges of the highlighted text. + repeated HighlightedTextRange highlighted_text_ranges = 2; + } + + HighlightedText highlighted_text = 1; + + // The review that the highlighted text is generated from. + Review review = 2; + } + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // BusinessAvailabilityAttributes justifications. This shows some attributes + // a business has that could interest an end user. + message BusinessAvailabilityAttributesJustification { + // If a place provides takeout. + bool takeout = 1; + + // If a place provides delivery. + bool delivery = 2; + + // If a place provides dine-in. + bool dine_in = 3; + } + + oneof justification { + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + ReviewJustification review_justification = 1; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + BusinessAvailabilityAttributesJustification + business_availability_attributes_justification = 2; + } + } + + // List of reviews about this place, contexual to the place query. + repeated Review reviews = 1; + + // Information (including references) about photos of this place, contexual to + // the place query. + repeated Photo photos = 2; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // Justifications for the place. + repeated Justification justifications = 3; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto new file mode 100644 index 00000000000..80db0cb76e8 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto @@ -0,0 +1,111 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "EvChargingProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Information about the EV Charge Station hosted in Place. +// Terminology follows +// https://afdc.energy.gov/fuels/electricity_infrastructure.html One port +// could charge one car at a time. One port has one or more connectors. One +// station has one or more ports. +message EVChargeOptions { + // EV charging information grouped by [type, max_charge_rate_kw]. + // Shows EV charge aggregation of connectors that have the same type and max + // charge rate in kw. + message ConnectorAggregation { + // The connector type of this aggregation. + EVConnectorType type = 1; + + // The static max charging rate in kw of each connector in the aggregation. + double max_charge_rate_kw = 2; + + // Number of connectors in this aggregation. + int32 count = 3; + + // Number of connectors in this aggregation that are currently available. + optional int32 available_count = 4; + + // Number of connectors in this aggregation that are currently out of + // service. + optional int32 out_of_service_count = 5; + + // The timestamp when the connector availability information in this + // aggregation was last updated. + google.protobuf.Timestamp availability_last_update_time = 6; + } + + // Number of connectors at this station. However, because some ports can have + // multiple connectors but only be able to charge one car at a time (e.g.) the + // number of connectors may be greater than the total number of cars which can + // charge simultaneously. + int32 connector_count = 1; + + // A list of EV charging connector aggregations that contain connectors of the + // same type and same charge rate. + repeated ConnectorAggregation connector_aggregation = 2; +} + +// See http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 for +// additional information/context on EV charging connector types. +enum EVConnectorType { + // Unspecified connector. + EV_CONNECTOR_TYPE_UNSPECIFIED = 0; + + // Other connector types. + EV_CONNECTOR_TYPE_OTHER = 1; + + // J1772 type 1 connector. + EV_CONNECTOR_TYPE_J1772 = 2; + + // IEC 62196 type 2 connector. Often referred to as MENNEKES. + EV_CONNECTOR_TYPE_TYPE_2 = 3; + + // CHAdeMO type connector. + EV_CONNECTOR_TYPE_CHADEMO = 4; + + // Combined Charging System (AC and DC). Based on SAE. + // Type-1 J-1772 connector + EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5; + + // Combined Charging System (AC and DC). Based on Type-2 + // Mennekes connector + EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6; + + // The generic TESLA connector. This is NACS in the North America but can be + // non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). + // This value is less representative of an actual connector type, and more + // represents the ability to charge a Tesla brand vehicle at a Tesla owned + // charging station. + EV_CONNECTOR_TYPE_TESLA = 7; + + // GB/T type corresponds to the GB/T standard in China. This type covers all + // GB_T types. + EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8; + + // Unspecified wall outlet. + EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto new file mode 100644 index 00000000000..c0e6e9900eb --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto @@ -0,0 +1,109 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/protobuf/timestamp.proto"; +import "google/type/money.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "FuelOptionsProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// The most recent information about fuel options in a gas station. This +// information is updated regularly. +message FuelOptions { + // Fuel price information for a given type. + message FuelPrice { + // Types of fuel. + enum FuelType { + // Unspecified fuel type. + FUEL_TYPE_UNSPECIFIED = 0; + + // Diesel fuel. + DIESEL = 1; + + // Regular unleaded. + REGULAR_UNLEADED = 2; + + // Midgrade. + MIDGRADE = 3; + + // Premium. + PREMIUM = 4; + + // SP 91. + SP91 = 5; + + // SP 91 E10. + SP91_E10 = 6; + + // SP 92. + SP92 = 7; + + // SP 95. + SP95 = 8; + + // SP95 E10. + SP95_E10 = 9; + + // SP 98. + SP98 = 10; + + // SP 99. + SP99 = 11; + + // SP 100. + SP100 = 12; + + // LPG. + LPG = 13; + + // E 80. + E80 = 14; + + // E 85. + E85 = 15; + + // Methane. + METHANE = 16; + + // Bio-diesel. + BIO_DIESEL = 17; + + // Truck diesel. + TRUCK_DIESEL = 18; + } + + // The type of fuel. + FuelType type = 1; + + // The price of the fuel. + google.type.Money price = 2; + + // The time the fuel price was last updated. + google.protobuf.Timestamp update_time = 3; + } + + // The last known fuel price for each type of fuel this station has. There is + // one entry per fuel type this station has. Order is not important. + repeated FuelPrice fuel_prices = 1; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto new file mode 100644 index 00000000000..92ebd887a24 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto @@ -0,0 +1,42 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/field_behavior.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Circle with a LatLng as center and radius. +message Circle { + // Required. Center latitude and longitude. + // + // The range of latitude must be within [-90.0, 90.0]. The range of the + // longitude must be within [-180.0, 180.0]. + google.type.LatLng center = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Radius measured in meters. The radius must be within [0.0, + // 50000.0]. + double radius = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto new file mode 100644 index 00000000000..b340dce98e9 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto @@ -0,0 +1,54 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/maps/places/v1/attribution.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "PhotoProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Information about a photo of a place. +message Photo { + option (google.api.resource) = { + type: "places.googleapis.com/Photo" + pattern: "places/{place}/photos/{photo}" + plural: "photos" + singular: "photo" + }; + + // Identifier. A reference representing this place photo which may be used to + // look up this place photo again (also called the API "resource" name: + // `places/{place_id}/photos/{photo}`). + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The maximum available width, in pixels. + int32 width_px = 2; + + // The maximum available height, in pixels. + int32 height_px = 3; + + // This photo's authors. + repeated AuthorAttribution author_attributions = 4; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto new file mode 100644 index 00000000000..47e8206acce --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto @@ -0,0 +1,584 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/resource.proto"; +import "google/geo/type/viewport.proto"; +import "google/maps/places/v1/content_block.proto"; +import "google/maps/places/v1/ev_charging.proto"; +import "google/maps/places/v1/fuel_options.proto"; +import "google/maps/places/v1/photo.proto"; +import "google/maps/places/v1/reference.proto"; +import "google/maps/places/v1/review.proto"; +import "google/type/date.proto"; +import "google/type/latlng.proto"; +import "google/type/localized_text.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "PlaceProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// All the information representing a Place. +message Place { + option (google.api.resource) = { + type: "places.googleapis.com/Place" + pattern: "places/{place_id}" + plural: "places" + singular: "place" + }; + + // The structured components that form the formatted address, if this + // information is available. + message AddressComponent { + // The full text description or name of the address component. For example, + // an address component for the country Australia may have a long_name of + // "Australia". + string long_text = 1; + + // An abbreviated textual name for the address component, if available. For + // example, an address component for the country of Australia may have a + // short_name of "AU". + string short_text = 2; + + // An array indicating the type(s) of the address component. + repeated string types = 3; + + // The language used to format this components, in CLDR notation. + string language_code = 4; + } + + // Plus code (http://plus.codes) is a location reference with two formats: + // global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, + // and compound code, replacing the prefix with a reference location. + message PlusCode { + // Place's global (full) code, such as "9FWM33GV+HQ", representing an + // 1/8000 by 1/8000 degree area (~14 by 14 meters). + string global_code = 1; + + // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing + // the suffix of the global code and replacing the prefix with a formatted + // name of a reference entity. + string compound_code = 2; + } + + // Information about business hour of the place. + message OpeningHours { + // A period the place remains in open_now status. + message Period { + // Status changing points. + message Point { + // A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is + // Monday, etc. + optional int32 day = 1; + + // The hour in 2 digits. Ranges from 00 to 23. + optional int32 hour = 2; + + // The minute in 2 digits. Ranges from 00 to 59. + optional int32 minute = 3; + + // Date in the local timezone for the place. + google.type.Date date = 6; + + // Whether or not this endpoint was truncated. Truncation occurs when + // the real hours are outside the times we are willing to return hours + // between, so we truncate the hours back to these boundaries. This + // ensures that at most 24 * 7 hours from midnight of the day of the + // request are returned. + bool truncated = 5; + } + + // The time that the place starts to be open. + Point open = 1; + + // The time that the place starts to be closed. + Point close = 2; + } + + // A type used to identify the type of secondary hours. + enum SecondaryHoursType { + // Default value when secondary hour type is not specified. + SECONDARY_HOURS_TYPE_UNSPECIFIED = 0; + + // The drive-through hour for banks, restaurants, or pharmacies. + DRIVE_THROUGH = 1; + + // The happy hour. + HAPPY_HOUR = 2; + + // The delivery hour. + DELIVERY = 3; + + // The takeout hour. + TAKEOUT = 4; + + // The kitchen hour. + KITCHEN = 5; + + // The breakfast hour. + BREAKFAST = 6; + + // The lunch hour. + LUNCH = 7; + + // The dinner hour. + DINNER = 8; + + // The brunch hour. + BRUNCH = 9; + + // The pickup hour. + PICKUP = 10; + + // The access hours for storage places. + ACCESS = 11; + + // The special hours for seniors. + SENIOR_HOURS = 12; + + // The online service hours. + ONLINE_SERVICE_HOURS = 13; + } + + // Structured information for special days that fall within the period that + // the returned opening hours cover. Special days are days that could impact + // the business hours of a place, e.g. Christmas day. + message SpecialDay { + // The date of this special day. + google.type.Date date = 1; + } + + // Is this place open right now? Always present unless we lack time-of-day + // or timezone data for these opening hours. + optional bool open_now = 1; + + // The periods that this place is open during the week. The periods are in + // chronological order, starting with Sunday in the place-local timezone. An + // empty (but not absent) value indicates a place that is never open, e.g. + // because it is closed temporarily for renovations. + repeated Period periods = 2; + + // Localized strings describing the opening hours of this place, one string + // for each day of the week. Will be empty if the hours are unknown or + // could not be converted to localized text. Example: "Sun: 18:00–06:00" + repeated string weekday_descriptions = 3; + + // A type string used to identify the type of secondary hours. + SecondaryHoursType secondary_hours_type = 4; + + // Structured information for special days that fall within the period that + // the returned opening hours cover. Special days are days that could impact + // the business hours of a place, e.g. Christmas day. Set for + // current_opening_hours and current_secondary_opening_hours if there are + // exceptional hours. + repeated SpecialDay special_days = 5; + } + + // Business status for the place. + enum BusinessStatus { + // Default value. This value is unused. + BUSINESS_STATUS_UNSPECIFIED = 0; + + // The establishment is operational, not necessarily open now. + OPERATIONAL = 1; + + // The establishment is temporarily closed. + CLOSED_TEMPORARILY = 2; + + // The establishment is permanently closed. + CLOSED_PERMANENTLY = 3; + } + + // Information about data providers of this place. + message Attribution { + // Name of the Place's data provider. + string provider = 1; + + // URI to the Place's data provider. + string provider_uri = 2; + } + + // Payment options the place accepts. + message PaymentOptions { + // Place accepts credit cards as payment. + optional bool accepts_credit_cards = 1; + + // Place accepts debit cards as payment. + optional bool accepts_debit_cards = 2; + + // Place accepts cash only as payment. Places with this attribute may still + // accept other payment methods. + optional bool accepts_cash_only = 3; + + // Place accepts NFC payments. + optional bool accepts_nfc = 4; + } + + // Information about parking options for the place. A parking lot could + // support more than one option at the same time. + message ParkingOptions { + // Place offers free parking lots. + optional bool free_parking_lot = 1; + + // Place offers paid parking lots. + optional bool paid_parking_lot = 2; + + // Place offers free street parking. + optional bool free_street_parking = 3; + + // Place offers paid street parking. + optional bool paid_street_parking = 4; + + // Place offers valet parking. + optional bool valet_parking = 5; + + // Place offers free garage parking. + optional bool free_garage_parking = 6; + + // Place offers paid garage parking. + optional bool paid_garage_parking = 7; + } + + // Place resource name and id of sub destinations that relate to the place. + // For example, different terminals are different destinations of an airport. + message SubDestination { + // The resource name of the sub destination. + string name = 1 [ + (google.api.resource_reference) = { type: "places.googleapis.com/Place" } + ]; + + // The place id of the sub destination. + string id = 2; + } + + // Information about the accessibility options a place offers. + message AccessibilityOptions { + // Place offers wheelchair accessible parking. + optional bool wheelchair_accessible_parking = 1; + + // Places has wheelchair accessible entrance. + optional bool wheelchair_accessible_entrance = 2; + + // Place has wheelchair accessible restroom. + optional bool wheelchair_accessible_restroom = 3; + + // Place has wheelchair accessible seating. + optional bool wheelchair_accessible_seating = 4; + } + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the place. + message GenerativeSummary { + // The overview of the place. + google.type.LocalizedText overview = 1; + + // The detailed description of the place. + google.type.LocalizedText description = 2; + + // References that are used to generate the summary description. + References references = 3; + } + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the area that the place is in. + message AreaSummary { + // Content blocks that compose the area summary. Each block has a separate + // topic about the area. + repeated ContentBlock content_blocks = 4; + } + + // This Place's resource name, in `places/{place_id}` format. Can be used to + // look up the Place. + string name = 1; + + // The unique identifier of a place. + string id = 2; + + // The localized name of the place, suitable as a short human-readable + // description. For example, "Google Sydney", "Starbucks", "Pyrmont", etc. + google.type.LocalizedText display_name = 31; + + // A set of type tags for this result. For example, "political" and + // "locality". For the complete list of possible values, see Table A and Table + // B at + // https://developers.google.com/maps/documentation/places/web-service/place-types + repeated string types = 5; + + // The primary type of the given result. This type must one of the Places API + // supported types. For example, "restaurant", "cafe", "airport", etc. A + // place can only have a single primary type. For the complete list of + // possible values, see Table A and Table B at + // https://developers.google.com/maps/documentation/places/web-service/place-types + string primary_type = 50; + + // The display name of the primary type, localized to the request language if + // applicable. For the complete list of possible values, see Table A and Table + // B at + // https://developers.google.com/maps/documentation/places/web-service/place-types + google.type.LocalizedText primary_type_display_name = 32; + + // A human-readable phone number for the place, in national format. + string national_phone_number = 7; + + // A human-readable phone number for the place, in international format. + string international_phone_number = 8; + + // A full, human-readable address for this place. + string formatted_address = 9; + + // A short, human-readable address for this place. + string short_formatted_address = 51; + + // Repeated components for each locality level. + // Note the following facts about the address_components[] array: + // - The array of address components may contain more components than the + // formatted_address. + // - The array does not necessarily include all the political entities that + // contain an address, apart from those included in the formatted_address. To + // retrieve all the political entities that contain a specific address, you + // should use reverse geocoding, passing the latitude/longitude of the address + // as a parameter to the request. + // - The format of the response is not guaranteed to remain the same between + // requests. In particular, the number of address_components varies based on + // the address requested and can change over time for the same address. A + // component can change position in the array. The type of the component can + // change. A particular component may be missing in a later response. + repeated AddressComponent address_components = 10; + + // Plus code of the place location lat/long. + PlusCode plus_code = 11; + + // The position of this place. + google.type.LatLng location = 12; + + // A viewport suitable for displaying the place on an average-sized map. + google.geo.type.Viewport viewport = 13; + + // A rating between 1.0 and 5.0, based on user reviews of this place. + double rating = 14; + + // A URL providing more information about this place. + string google_maps_uri = 15; + + // The authoritative website for this place, e.g. a business' homepage. + // Note that for places that are part of a chain (e.g. an IKEA store), this + // will usually be the website for the individual store, not the overall + // chain. + string website_uri = 16; + + // List of reviews about this place, sorted by relevance. A maximum of 5 + // reviews can be returned. + repeated Review reviews = 53; + + // The regular hours of operation. + OpeningHours regular_opening_hours = 21; + + // Number of minutes this place's timezone is currently offset from UTC. + // This is expressed in minutes to support timezones that are offset by + // fractions of an hour, e.g. X hours and 15 minutes. + optional int32 utc_offset_minutes = 22; + + // Information (including references) about photos of this place. A maximum of + // 10 photos can be returned. + repeated Photo photos = 54; + + // The place's address in adr microformat: http://microformats.org/wiki/adr. + string adr_format_address = 24; + + // The business status for the place. + BusinessStatus business_status = 25; + + // Price level of the place. + PriceLevel price_level = 26; + + // A set of data provider that must be shown with this result. + repeated Attribution attributions = 27; + + // The total number of reviews (with or without text) for this place. + optional int32 user_rating_count = 28; + + // A truncated URL to an icon mask. User can access different icon type by + // appending type suffix to the end (eg, ".svg" or ".png"). + string icon_mask_base_uri = 29; + + // Background color for icon_mask in hex format, e.g. #909CE1. + string icon_background_color = 30; + + // Specifies if the business supports takeout. + optional bool takeout = 33; + + // Specifies if the business supports delivery. + optional bool delivery = 34; + + // Specifies if the business supports indoor or outdoor seating options. + optional bool dine_in = 35; + + // Specifies if the business supports curbside pickup. + optional bool curbside_pickup = 36; + + // Specifies if the place supports reservations. + optional bool reservable = 38; + + // Specifies if the place serves breakfast. + optional bool serves_breakfast = 39; + + // Specifies if the place serves lunch. + optional bool serves_lunch = 40; + + // Specifies if the place serves dinner. + optional bool serves_dinner = 41; + + // Specifies if the place serves beer. + optional bool serves_beer = 42; + + // Specifies if the place serves wine. + optional bool serves_wine = 43; + + // Specifies if the place serves brunch. + optional bool serves_brunch = 44; + + // Specifies if the place serves vegetarian food. + optional bool serves_vegetarian_food = 45; + + // The hours of operation for the next seven days (including today). The time + // period starts at midnight on the date of the request and ends at 11:59 pm + // six days later. This field includes the special_days subfield of all hours, + // set for dates that have exceptional hours. + OpeningHours current_opening_hours = 46; + + // Contains an array of entries for the next seven days including information + // about secondary hours of a business. Secondary hours are different from a + // business's main hours. For example, a restaurant can specify drive through + // hours or delivery hours as its secondary hours. This field populates the + // type subfield, which draws from a predefined list of opening hours types + // (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the + // place. This field includes the special_days subfield of all hours, set for + // dates that have exceptional hours. + repeated OpeningHours current_secondary_opening_hours = 47; + + // Contains an array of entries for information about regular secondary hours + // of a business. Secondary hours are different from a business's main hours. + // For example, a restaurant can specify drive through hours or delivery hours + // as its secondary hours. This field populates the type subfield, which draws + // from a predefined list of opening hours types (such as DRIVE_THROUGH, + // PICKUP, or TAKEOUT) based on the types of the place. + repeated OpeningHours regular_secondary_opening_hours = 49; + + // Contains a summary of the place. A summary is comprised of a textual + // overview, and also includes the language code for these if applicable. + // Summary text must be presented as-is and can not be modified or altered. + google.type.LocalizedText editorial_summary = 52; + + // Place provides outdoor seating. + optional bool outdoor_seating = 55; + + // Place provides live music. + optional bool live_music = 56; + + // Place has a children's menu. + optional bool menu_for_children = 57; + + // Place serves cocktails. + optional bool serves_cocktails = 58; + + // Place serves dessert. + optional bool serves_dessert = 59; + + // Place serves coffee. + optional bool serves_coffee = 60; + + // Place is good for children. + optional bool good_for_children = 62; + + // Place allows dogs. + optional bool allows_dogs = 63; + + // Place has restroom. + optional bool restroom = 64; + + // Place accommodates groups. + optional bool good_for_groups = 65; + + // Place is suitable for watching sports. + optional bool good_for_watching_sports = 66; + + // Payment options the place accepts. If a payment option data is not + // available, the payment option field will be unset. + PaymentOptions payment_options = 67; + + // Options of parking provided by the place. + ParkingOptions parking_options = 70; + + // A list of sub destinations related to the place. + repeated SubDestination sub_destinations = 71; + + // Information about the accessibility options a place offers. + optional AccessibilityOptions accessibility_options = 72; + + // The most recent information about fuel options in a gas station. This + // information is updated regularly. + FuelOptions fuel_options = 78; + + // Information of ev charging options. + EVChargeOptions ev_charge_options = 79; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the place. + GenerativeSummary generative_summary = 80; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the area that the place is in. + AreaSummary area_summary = 81; +} + +// Price level of the place. +enum PriceLevel { + // Place price level is unspecified or unknown. + PRICE_LEVEL_UNSPECIFIED = 0; + + // Place provides free services. + PRICE_LEVEL_FREE = 1; + + // Place provides inexpensive services. + PRICE_LEVEL_INEXPENSIVE = 2; + + // Place provides moderately priced services. + PRICE_LEVEL_MODERATE = 3; + + // Place provides expensive services. + PRICE_LEVEL_EXPENSIVE = 4; + + // Place provides very expensive services. + PRICE_LEVEL_VERY_EXPENSIVE = 5; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto new file mode 100644 index 00000000000..ea9f82aa2e0 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto @@ -0,0 +1,772 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/geo/type/viewport.proto"; +import "google/maps/places/v1/contextual_content.proto"; +import "google/maps/places/v1/ev_charging.proto"; +import "google/maps/places/v1/geometry.proto"; +import "google/maps/places/v1/place.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "PlacesServiceProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Service definition for the Places API. +// Note: every request (except for Autocomplete requests) requires a field mask +// set outside of the request proto (`all/*`, is not assumed). The field mask +// can be set via the HTTP header `X-Goog-FieldMask`. See: +// https://developers.google.com/maps/documentation/places/web-service/choose-fields +service Places { + option (google.api.default_host) = "places.googleapis.com"; + + // Search for places near locations. + rpc SearchNearby(SearchNearbyRequest) returns (SearchNearbyResponse) { + option (google.api.http) = { + post: "/v1/places:searchNearby" + body: "*" + }; + } + + // Text query based place search. + rpc SearchText(SearchTextRequest) returns (SearchTextResponse) { + option (google.api.http) = { + post: "/v1/places:searchText" + body: "*" + }; + } + + // Get a photo media with a photo reference string. + rpc GetPhotoMedia(GetPhotoMediaRequest) returns (PhotoMedia) { + option (google.api.http) = { + get: "/v1/{name=places/*/photos/*/media}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the details of a place based on its resource name, which is a string + // in the `places/{place_id}` format. + rpc GetPlace(GetPlaceRequest) returns (Place) { + option (google.api.http) = { + get: "/v1/{name=places/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns predictions for the given input. + rpc AutocompletePlaces(AutocompletePlacesRequest) + returns (AutocompletePlacesResponse) { + option (google.api.http) = { + post: "/v1/places:autocomplete" + body: "*" + }; + } +} + +// Request proto for Search Nearby. +// +// +message SearchNearbyRequest { + // The region to search. + message LocationRestriction { + oneof type { + // A circle defined by center point and radius. + Circle circle = 2; + } + } + + // How results will be ranked in the response. + enum RankPreference { + // RankPreference value not set. Will use rank by POPULARITY by default. + RANK_PREFERENCE_UNSPECIFIED = 0; + + // Ranks results by distance. + DISTANCE = 1; + + // Ranks results by popularity. + POPULARITY = 2; + } + + // Place details will be displayed with the preferred language if available. + // If the language code is unspecified or unrecognized, place details of any + // language may be returned, with a preference for English if such details + // exist. + // + // Current list of supported languages: + // https://developers.google.com/maps/faq#languagesupport. + string language_code = 1; + + // The Unicode country/region code (CLDR) of the location where the + // request is coming from. This parameter is used to display the place + // details, like region-specific place name, if available. The parameter can + // affect results based on applicable law. + // + // For more information, see + // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + // + // + // Note that 3-digit region codes are not currently supported. + string region_code = 2; + + // Included Place type (eg, "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // + // Up to 50 types from [Table + // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + // may be specified. + // + // If there are any conflicting types, i.e. a type appears in both + // included_types and excluded_types, an INVALID_ARGUMENT error is + // returned. + // + // If a Place type is specified with multiple type restrictions, only places + // that satisfy all of the restrictions are returned. For example, if we + // have {included_types = ["restaurant"], excluded_primary_types = + // ["restaurant"]}, the returned places provide "restaurant" + // related services but do not operate primarily as "restaurants". + repeated string included_types = 3; + + // Excluded Place type (eg, "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // + // Up to 50 types from [Table + // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + // may be specified. + // + // If the client provides both included_types (e.g. restaurant) and + // excluded_types (e.g. cafe), then the response should include places that + // are restaurant but not cafe. The response includes places that match at + // least one of the included_types and none of the excluded_types. + // + // If there are any conflicting types, i.e. a type appears in both + // included_types and excluded_types, an INVALID_ARGUMENT error is returned. + // + // If a Place type is specified with multiple type restrictions, only places + // that satisfy all of the restrictions are returned. For example, if we + // have {included_types = ["restaurant"], excluded_primary_types = + // ["restaurant"]}, the returned places provide "restaurant" + // related services but do not operate primarily as "restaurants". + repeated string excluded_types = 4; + + // Included primary Place type (e.g. "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // A place can only have a single primary type from the supported types table + // associated with it. + // + // Up to 50 types from [Table + // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + // may be specified. + // + // If there are any conflicting primary types, i.e. a type appears in both + // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + // error is returned. + // + // If a Place type is specified with multiple type restrictions, only places + // that satisfy all of the restrictions are returned. For example, if we + // have {included_types = ["restaurant"], excluded_primary_types = + // ["restaurant"]}, the returned places provide "restaurant" + // related services but do not operate primarily as "restaurants". + repeated string included_primary_types = 5; + + // Excluded primary Place type (e.g. "restaurant" or "gas_station") from + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // + // Up to 50 types from [Table + // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + // may be specified. + // + // If there are any conflicting primary types, i.e. a type appears in both + // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + // error is returned. + // + // If a Place type is specified with multiple type restrictions, only places + // that satisfy all of the restrictions are returned. For example, if we + // have {included_types = ["restaurant"], excluded_primary_types = + // ["restaurant"]}, the returned places provide "restaurant" + // related services but do not operate primarily as "restaurants". + repeated string excluded_primary_types = 6; + + // Maximum number of results to return. It must be between 1 and 20 (default), + // inclusively. If the number is unset, it falls back to the upper limit. If + // the number is set to negative or exceeds the upper limit, an + // INVALID_ARGUMENT error is returned. + int32 max_result_count = 7; + + // Required. The region to search. + LocationRestriction location_restriction = 8 + [(google.api.field_behavior) = REQUIRED]; + + // How results will be ranked in the response. + RankPreference rank_preference = 9; +} + +// Response proto for Search Nearby. +// +message SearchNearbyResponse { + // A list of places that meets user's requirements like places + // types, number of places and specific location restriction. + repeated Place places = 1; +} + +// Request proto for SearchText. +// +// +message SearchTextRequest { + // How results will be ranked in the response. + enum RankPreference { + // For a categorical query such as "Restaurants in New York City", RELEVANCE + // is the default. For non-categorical queries such as "Mountain View, CA" + // we recommend that you leave rankPreference unset. + RANK_PREFERENCE_UNSPECIFIED = 0; + + // Ranks results by distance. + DISTANCE = 1; + + // Ranks results by relevance. Sort order determined by normal ranking + // stack. + RELEVANCE = 2; + } + + // The region to search. This location serves as a bias which means results + // around given location might be returned. + message LocationBias { + oneof type { + // A rectangle box defined by northeast and southwest corner. + // `rectangle.high()` must be the northeast point of the rectangle + // viewport. `rectangle.low()` must be the southwest point of the + // rectangle viewport. `rectangle.low().latitude()` cannot be greater than + // `rectangle.high().latitude()`. This will result in an empty latitude + // range. A rectangle viewport cannot be wider than 180 degrees. + google.geo.type.Viewport rectangle = 1; + + // A circle defined by center point and radius. + Circle circle = 2; + } + } + + // The region to search. This location serves as a restriction which means + // results outside given location will not be returned. + message LocationRestriction { + oneof type { + // A rectangle box defined by northeast and southwest corner. + // `rectangle.high()` must be the northeast point of the rectangle + // viewport. `rectangle.low()` must be the southwest point of the + // rectangle viewport. `rectangle.low().latitude()` cannot be greater than + // `rectangle.high().latitude()`. This will result in an empty latitude + // range. A rectangle viewport cannot be wider than 180 degrees. + google.geo.type.Viewport rectangle = 1; + } + } + + // Searchable EV options of a place search request. + message EVOptions { + // Optional. Minimum required charging rate in kilowatts. A place with a + // charging rate less than the specified rate is filtered out. + double minimum_charging_rate_kw = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of preferred EV connector types. A place that does not + // support any of the listed connector types is filtered out. + repeated EVConnectorType connector_types = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The text query for textual search. + string text_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Place details will be displayed with the preferred language if available. + // If the language code is unspecified or unrecognized, place details of any + // language may be returned, with a preference for English if such details + // exist. + // + // Current list of supported languages: + // https://developers.google.com/maps/faq#languagesupport. + string language_code = 2; + + // The Unicode country/region code (CLDR) of the location where the + // request is coming from. This parameter is used to display the place + // details, like region-specific place name, if available. The parameter can + // affect results based on applicable law. + // + // For more information, see + // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + // + // + // Note that 3-digit region codes are not currently supported. + string region_code = 3; + + // How results will be ranked in the response. + RankPreference rank_preference = 4; + + // The requested place type. Full list of types supported: + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // Only support one included type. + string included_type = 6; + + // Used to restrict the search to places that are currently open. The default + // is false. + bool open_now = 7; + + // Filter out results whose average user rating is strictly less than this + // limit. A valid value must be a float between 0 and 5 (inclusively) at a + // 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating + // will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 + // will eliminate all results with a less than 1.0 rating. + double min_rating = 9; + + // Maximum number of results to return. It must be between 1 and 20, + // inclusively. The default is 20. If the number is unset, it falls back to + // the upper limit. If the number is set to negative or exceeds the upper + // limit, an INVALID_ARGUMENT error is returned. + int32 max_result_count = 10; + + // Used to restrict the search to places that are marked as certain price + // levels. Users can choose any combinations of price levels. Default to + // select all price levels. + repeated PriceLevel price_levels = 11; + + // Used to set strict type filtering for included_type. If set to true, only + // results of the same type will be returned. Default to false. + bool strict_type_filtering = 12; + + // The region to search. This location serves as a bias which means results + // around given location might be returned. Cannot be set along with + // location_restriction. + LocationBias location_bias = 13; + + // The region to search. This location serves as a restriction which means + // results outside given location will not be returned. Cannot be set along + // with location_bias. + LocationRestriction location_restriction = 14; + + // Optional. Set the searchable EV options of a place search request. + EVOptions ev_options = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response proto for SearchText. +// +message SearchTextResponse { + // A list of places that meet the user's text search criteria. + repeated Place places = 1; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // A list of contextual contents where each entry associates to the + // corresponding place in the same index in the places field. The contents + // that are relevant to the `text_query` in the request are preferred. If the + // contextual content is not available for one of the places, it will return + // non-contextual content. It will be empty only when the content is + // unavailable for this place. This list should have as many entries as the + // list of places if requested. + repeated ContextualContent contextual_contents = 3; +} + +// Request for fetching a photo of a place using a photo resource name. +message GetPhotoMediaRequest { + // Required. The resource name of a photo media in the format: + // `places/{place_id}/photos/{photo_reference}/media`. + // + // The resource name of a photo as returned in a Place object's `photos.name` + // field comes with the format + // `places/{place_id}/photos/{photo_reference}`. You need to append `/media` + // at the end of the photo resource to get the photo media resource name. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "places.googleapis.com/PhotoMedia" + } + ]; + + // Optional. Specifies the maximum desired width, in pixels, of the image. If + // the image is smaller than the values specified, the original image will be + // returned. If the image is larger in either dimension, it will be scaled to + // match the smaller of the two dimensions, restricted to its original aspect + // ratio. Both the max_height_px and max_width_px properties accept an integer + // between 1 and 4800, inclusively. If the value is not within the allowed + // range, an INVALID_ARGUMENT error will be returned. + // + // At least one of max_height_px or max_width_px needs to be specified. If + // neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + // error will be returned. + int32 max_width_px = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum desired height, in pixels, of the image. If + // the image is smaller than the values specified, the original image will be + // returned. If the image is larger in either dimension, it will be scaled to + // match the smaller of the two dimensions, restricted to its original aspect + // ratio. Both the max_height_px and max_width_px properties accept an integer + // between 1 and 4800, inclusively. If the value is not within the allowed + // range, an INVALID_ARGUMENT error will be returned. + // + // At least one of max_height_px or max_width_px needs to be specified. If + // neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + // error will be returned. + int32 max_height_px = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, skip the default HTTP redirect behavior and render a text + // format (for example, in JSON format for HTTP use case) response. If not + // set, an HTTP redirect will be issued to redirect the call to the image + // media. This option is ignored for non-HTTP requests. + bool skip_http_redirect = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A photo media from Places API. +message PhotoMedia { + option (google.api.resource) = { + type: "places.googleapis.com/PhotoMedia" + pattern: "places/{place_id}/photos/{photo_reference}/media" + plural: "photoMedias" + singular: "photoMedia" + }; + + // The resource name of a photo media in the format: + // `places/{place_id}/photos/{photo_reference}/media`. + string name = 1; + + // A short-lived uri that can be used to render the photo. + string photo_uri = 2; +} + +// Request for fetching a Place based on its resource name, which is a string in +// the `places/{place_id}` format. +message GetPlaceRequest { + // Required. The resource name of a place, in the `places/{place_id}` format. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "places.googleapis.com/Place" } + ]; + + // Optional. Place details will be displayed with the preferred language if + // available. + // + // Current list of supported languages: + // https://developers.google.com/maps/faq#languagesupport. + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Unicode country/region code (CLDR) of the location where the + // request is coming from. This parameter is used to display the place + // details, like region-specific place name, if available. The parameter can + // affect results based on applicable law. + // For more information, see + // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + // + // + // Note that 3-digit region codes are not currently supported. + string region_code = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A string which identifies an Autocomplete session for billing + // purposes. Must be a URL and filename safe base64 string with at most 36 + // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + // returned. + // + // The session begins when the user starts typing a query, and concludes when + // they select a place and a call to Place Details or Address Validation is + // made. Each session can have multiple queries, followed by one Place Details + // or Address Validation request. The credentials used for each request within + // a session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must generate + // a fresh token for each session. If the `session_token` parameter is + // omitted, or if you reuse a session token, the session is charged as if no + // session token was provided (each request is billed separately). + // + // We recommend the following guidelines: + // + // * Use session tokens for all Place Autocomplete calls. + // * Generate a fresh token for each session. Using a version 4 UUID is + // recommended. + // * Ensure that the credentials used for all Place Autocomplete, Place + // Details, and Address Validation requests within a session belong to the + // same Cloud Console project. + // * Be sure to pass a unique session token for each new session. Using the + // same token for more than one session will result in each request being + // billed individually. + string session_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request proto for AutocompletePlaces. +message AutocompletePlacesRequest { + // The region to search. The results may be biased around the specified + // region. + message LocationBias { + oneof type { + // A viewport defined by a northeast and a southwest corner. + google.geo.type.Viewport rectangle = 1; + + // A circle defined by a center point and radius. + Circle circle = 2; + } + } + + // The region to search. The results will be restricted to the specified + // region. + message LocationRestriction { + oneof type { + // A viewport defined by a northeast and a southwest corner. + google.geo.type.Viewport rectangle = 1; + + // A circle defined by a center point and radius. + Circle circle = 2; + } + } + + // Required. The text string on which to search. + string input = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Bias results to a specified location. + // + // At most one of `location_bias` or `location_restriction` should be set. If + // neither are set, the results will be biased by IP address, meaning the IP + // address will be mapped to an imprecise location and used as a biasing + // signal. + LocationBias location_bias = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restrict results to a specified location. + // + // At most one of `location_bias` or `location_restriction` should be set. If + // neither are set, the results will be biased by IP address, meaning the IP + // address will be mapped to an imprecise location and used as a biasing + // signal. + LocationRestriction location_restriction = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Included primary Place type (for example, "restaurant" or + // "gas_station") in Place Types + // (https://developers.google.com/maps/documentation/places/web-service/place-types), + // or only `(regions)`, or only `(cities)`. A Place is only returned if its + // primary type is included in this list. Up to 5 values can be specified. If + // no types are specified, all Place types are returned. + repeated string included_primary_types = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include results in the specified regions, specified as up to + // 15 CLDR two-character region codes. An empty set will not restrict the + // results. If both `location_restriction` and `included_region_codes` are + // set, the results will be located in the area of intersection. + repeated string included_region_codes = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language in which to return results. Defaults to en-US. The + // results may be in mixed languages if the language used in `input` is + // different from `language_code` or if the returned Place does not have a + // translation from the local language to `language_code`. + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The region code, specified as a CLDR two-character region code. + // This affects address formatting, result ranking, and may influence what + // results are returned. This does not restrict results to the specified + // region. To restrict results to a region, use `region_code_restriction`. + string region_code = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The origin point from which to calculate geodesic distance to the + // destination (returned as `distance_meters`). If this value is omitted, + // geodesic distance will not be returned. + google.type.LatLng origin = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A zero-based Unicode character offset of `input` indicating the + // cursor position in `input`. The cursor position may influence what + // predictions are returned. + // + // If empty, defaults to the length of `input`. + int32 input_offset = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include both Place and query + // predictions. Otherwise the response will only return Place predictions. + bool include_query_predictions = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A string which identifies an Autocomplete session for billing + // purposes. Must be a URL and filename safe base64 string with at most 36 + // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + // returned. + // + // The session begins when the user starts typing a query, and concludes when + // they select a place and a call to Place Details or Address Validation is + // made. Each session can have multiple queries, followed by one Place Details + // or Address Validation request. The credentials used for each request within + // a session must belong to the same Google Cloud Console project. Once a + // session has concluded, the token is no longer valid; your app must generate + // a fresh token for each session. If the `session_token` parameter is + // omitted, or if you reuse a session token, the session is charged as if no + // session token was provided (each request is billed separately). + // + // We recommend the following guidelines: + // + // * Use session tokens for all Place Autocomplete calls. + // * Generate a fresh token for each session. Using a version 4 UUID is + // recommended. + // * Ensure that the credentials used for all Place Autocomplete, Place + // Details, and Address Validation requests within a session belong to the + // same Cloud Console project. + // * Be sure to pass a unique session token for each new session. Using the + // same token for more than one session will result in each request being + // billed individually. + string session_token = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response proto for AutocompletePlaces. +message AutocompletePlacesResponse { + // An Autocomplete suggestion result. + message Suggestion { + // Identifies a substring within a given text. + message StringRange { + // Zero-based offset of the first Unicode character of the string + // (inclusive). + int32 start_offset = 1; + + // Zero-based offset of the last Unicode character (exclusive). + int32 end_offset = 2; + } + + // Text representing a Place or query prediction. The text may be used as is + // or formatted. + message FormattableText { + // Text that may be used as is or formatted with `matches`. + string text = 1; + + // A list of string ranges identifying where the input request matched in + // `text`. The ranges can be used to format specific parts of `text`. The + // substrings may not be exact matches of `input` if the matching was + // determined by criteria other than string matching (for example, spell + // corrections or transliterations). + // + // These values are Unicode character offsets of `text`. The ranges are + // guaranteed to be ordered in increasing offset values. + repeated StringRange matches = 2; + } + + // Contains a breakdown of a Place or query prediction into main text + // and secondary text. + // + // For Place predictions, the main text contains the specific name of the + // Place. For query predictions, the main text contains the query. + // + // The secondary text contains additional disambiguating features (such as a + // city or region) to further identify the Place or refine the query. + message StructuredFormat { + // Represents the name of the Place or query. + FormattableText main_text = 1; + + // Represents additional disambiguating features (such as a city or + // region) to further identify the Place or refine the query. + FormattableText secondary_text = 2; + } + + // Prediction results for a Place Autocomplete prediction. + message PlacePrediction { + // The resource name of the suggested Place. This name can be used in + // other APIs that accept Place names. + string place = 1 [(google.api.resource_reference) = { + type: "places.googleapis.com/Place" + }]; + + // The unique identifier of the suggested Place. This identifier can be + // used in other APIs that accept Place IDs. + string place_id = 2; + + // Contains the human-readable name for the returned result. For + // establishment results, this is usually the business name and address. + // + // `text` is recommended for developers who wish to show a single UI + // element. Developers who wish to show two separate, but related, UI + // elements may want to use `structured_format` instead. They are two + // different ways to represent a Place prediction. Users should not try to + // parse `structured_format` into `text` or vice versa. + // + // This text may be different from the `display_name` returned by + // GetPlace. + // + // May be in mixed languages if the request `input` and `language_code` + // are in different languages or if the Place does not have a translation + // from the local language to `language_code`. + FormattableText text = 3; + + // A breakdown of the Place prediction into main text containing the name + // of the Place and secondary text containing additional disambiguating + // features (such as a city or region). + // + // `structured_format` is recommended for developers who wish to show two + // separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a Place prediction. Users should not try to + // parse `structured_format` into `text` or vice versa. + StructuredFormat structured_format = 4; + + // List of types that apply to this Place from Table A or Table B in + // https://developers.google.com/maps/documentation/places/web-service/place-types. + // + // A type is a categorization of a Place. Places with shared types will + // share similar characteristics. + repeated string types = 5; + + // The length of the geodesic in meters from `origin` if `origin` is + // specified. Certain predictions such as routes may not populate this + // field. + int32 distance_meters = 6; + } + + // Prediction results for a Query Autocomplete prediction. + message QueryPrediction { + // The predicted text. This text does not represent a Place, but rather a + // text query that could be used in a search endpoint (for example, + // Text Search). + // + // `text` is recommended for developers who wish to show a single UI + // element. Developers who wish to show two separate, but related, UI + // elements may want to use `structured_format` instead. They are two + // different ways to represent a query prediction. Users should not try to + // parse `structured_format` into `text` or vice versa. + // + // May be in mixed languages if the request `input` and `language_code` + // are in different languages or if part of the query does not have a + // translation from the local language to `language_code`. + FormattableText text = 1; + + // A breakdown of the query prediction into main text containing the query + // and secondary text containing additional disambiguating features (such + // as a city or region). + // + // `structured_format` is recommended for developers who wish to show two + // separate, but related, UI elements. Developers who wish to show a + // single UI element may want to use `text` instead. They are two + // different ways to represent a query prediction. Users should not try to + // parse `structured_format` into `text` or vice versa. + StructuredFormat structured_format = 2; + } + + oneof kind { + // A prediction for a Place. + PlacePrediction place_prediction = 1; + + // A prediction for a query. + QueryPrediction query_prediction = 2; + } + } + + // Contains a list of suggestions, ordered in descending order of relevance. + repeated Suggestion suggestions = 1; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto new file mode 100644 index 00000000000..dc5947e75c3 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto @@ -0,0 +1,45 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/resource.proto"; +import "google/maps/places/v1/review.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "ReferenceProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Experimental: See +// https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative +// for more details. +// +// Reference that the generative content is related to. +message References { + // Reviews that serve as references. + repeated Review reviews = 1; + + // The list of resource names of the referenced places. This name can be used + // in other APIs that accept Place resource names. + repeated string places = 2 [ + (google.api.resource_reference) = { type: "places.googleapis.com/Place" } + ]; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto new file mode 100644 index 00000000000..5aaca3ab88a --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.maps.places.v1; + +import "google/api/resource.proto"; +import "google/maps/places/v1/attribution.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/localized_text.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "ReviewProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Information about a review of a place. +message Review { + option (google.api.resource) = { + type: "places.googleapis.com/Review" + pattern: "places/{place}/reviews/{review}" + plural: "reviews" + singular: "review" + }; + + // A reference representing this place review which may be used to look up + // this place review again (also called the API "resource" name: + // `places/{place_id}/reviews/{review}`). + string name = 1; + + // A string of formatted recent time, expressing the review time relative + // to the current time in a form appropriate for the language and country. + string relative_publish_time_description = 2; + + // The localized text of the review. + google.type.LocalizedText text = 9; + + // The review text in its original language. + google.type.LocalizedText original_text = 12; + + // A number between 1.0 and 5.0, also called the number of stars. + double rating = 7; + + // This review's author. + AuthorAttribution author_attribution = 13; + + // Timestamp for the review. + google.protobuf.Timestamp publish_time = 14; +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts b/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts new file mode 100644 index 00000000000..5942a59bebd --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts @@ -0,0 +1,13421 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace geo. */ + namespace geo { + + /** Namespace type. */ + namespace type { + + /** Properties of a Viewport. */ + interface IViewport { + + /** Viewport low */ + low?: (google.type.ILatLng|null); + + /** Viewport high */ + high?: (google.type.ILatLng|null); + } + + /** Represents a Viewport. */ + class Viewport implements IViewport { + + /** + * Constructs a new Viewport. + * @param [properties] Properties to set + */ + constructor(properties?: google.geo.type.IViewport); + + /** Viewport low. */ + public low?: (google.type.ILatLng|null); + + /** Viewport high. */ + public high?: (google.type.ILatLng|null); + + /** + * Creates a new Viewport instance using the specified properties. + * @param [properties] Properties to set + * @returns Viewport instance + */ + public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport; + + /** + * Verifies a Viewport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Viewport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Viewport + */ + public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @param message Viewport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Viewport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Viewport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); + } + + /** Represents a LatLng. */ + class LatLng implements ILatLng { + + /** + * Constructs a new LatLng. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILatLng); + + /** LatLng latitude. */ + public latitude: number; + + /** LatLng longitude. */ + public longitude: number; + + /** + * Creates a new LatLng instance using the specified properties. + * @param [properties] Properties to set + * @returns LatLng instance + */ + public static create(properties?: google.type.ILatLng): google.type.LatLng; + + /** + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatLng message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng; + + /** + * Decodes a LatLng message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng; + + /** + * Verifies a LatLng message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatLng + */ + public static fromObject(object: { [k: string]: any }): google.type.LatLng; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatLng to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatLng + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocalizedText. */ + interface ILocalizedText { + + /** LocalizedText text */ + text?: (string|null); + + /** LocalizedText languageCode */ + languageCode?: (string|null); + } + + /** Represents a LocalizedText. */ + class LocalizedText implements ILocalizedText { + + /** + * Constructs a new LocalizedText. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILocalizedText); + + /** LocalizedText text. */ + public text: string; + + /** LocalizedText languageCode. */ + public languageCode: string; + + /** + * Creates a new LocalizedText instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedText instance + */ + public static create(properties?: google.type.ILocalizedText): google.type.LocalizedText; + + /** + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LocalizedText; + + /** + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LocalizedText; + + /** + * Verifies a LocalizedText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedText + */ + public static fromObject(object: { [k: string]: any }): google.type.LocalizedText; + + /** + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. + * @param message LocalizedText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LocalizedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalizedText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Money. */ + interface IMoney { + + /** Money currencyCode */ + currencyCode?: (string|null); + + /** Money units */ + units?: (number|Long|string|null); + + /** Money nanos */ + nanos?: (number|null); + } + + /** Represents a Money. */ + class Money implements IMoney { + + /** + * Constructs a new Money. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IMoney); + + /** Money currencyCode. */ + public currencyCode: string; + + /** Money units. */ + public units: (number|Long|string); + + /** Money nanos. */ + public nanos: number; + + /** + * Creates a new Money instance using the specified properties. + * @param [properties] Properties to set + * @returns Money instance + */ + public static create(properties?: google.type.IMoney): google.type.Money; + + /** + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Money message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Money; + + /** + * Decodes a Money message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Money; + + /** + * Verifies a Money message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Money message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Money + */ + public static fromObject(object: { [k: string]: any }): google.type.Money; + + /** + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @param message Money + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Money to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Money + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace maps. */ + namespace maps { + + /** Namespace places. */ + namespace places { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of an AuthorAttribution. */ + interface IAuthorAttribution { + + /** AuthorAttribution displayName */ + displayName?: (string|null); + + /** AuthorAttribution uri */ + uri?: (string|null); + + /** AuthorAttribution photoUri */ + photoUri?: (string|null); + } + + /** Represents an AuthorAttribution. */ + class AuthorAttribution implements IAuthorAttribution { + + /** + * Constructs a new AuthorAttribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAuthorAttribution); + + /** AuthorAttribution displayName. */ + public displayName: string; + + /** AuthorAttribution uri. */ + public uri: string; + + /** AuthorAttribution photoUri. */ + public photoUri: string; + + /** + * Creates a new AuthorAttribution instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorAttribution instance + */ + public static create(properties?: google.maps.places.v1.IAuthorAttribution): google.maps.places.v1.AuthorAttribution; + + /** + * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @param message AuthorAttribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @param message AuthorAttribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthorAttribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AuthorAttribution; + + /** + * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AuthorAttribution; + + /** + * Verifies an AuthorAttribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorAttribution + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AuthorAttribution; + + /** + * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. + * @param message AuthorAttribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AuthorAttribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthorAttribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthorAttribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContentBlock. */ + interface IContentBlock { + + /** ContentBlock topic */ + topic?: (string|null); + + /** ContentBlock content */ + content?: (google.type.ILocalizedText|null); + + /** ContentBlock references */ + references?: (google.maps.places.v1.IReferences|null); + } + + /** Represents a ContentBlock. */ + class ContentBlock implements IContentBlock { + + /** + * Constructs a new ContentBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IContentBlock); + + /** ContentBlock topic. */ + public topic: string; + + /** ContentBlock content. */ + public content?: (google.type.ILocalizedText|null); + + /** ContentBlock references. */ + public references?: (google.maps.places.v1.IReferences|null); + + /** + * Creates a new ContentBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentBlock instance + */ + public static create(properties?: google.maps.places.v1.IContentBlock): google.maps.places.v1.ContentBlock; + + /** + * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @param message ContentBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @param message ContentBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContentBlock; + + /** + * Decodes a ContentBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContentBlock; + + /** + * Verifies a ContentBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentBlock + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContentBlock; + + /** + * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. + * @param message ContentBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContentBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a References. */ + interface IReferences { + + /** References reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); + + /** References places */ + places?: (string[]|null); + } + + /** Represents a References. */ + class References implements IReferences { + + /** + * Constructs a new References. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IReferences); + + /** References reviews. */ + public reviews: google.maps.places.v1.IReview[]; + + /** References places. */ + public places: string[]; + + /** + * Creates a new References instance using the specified properties. + * @param [properties] Properties to set + * @returns References instance + */ + public static create(properties?: google.maps.places.v1.IReferences): google.maps.places.v1.References; + + /** + * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @param message References message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @param message References message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a References message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.References; + + /** + * Decodes a References message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.References; + + /** + * Verifies a References message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a References message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns References + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.References; + + /** + * Creates a plain object from a References message. Also converts values to other types if specified. + * @param message References + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.References, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this References to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for References + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Review. */ + interface IReview { + + /** Review name */ + name?: (string|null); + + /** Review relativePublishTimeDescription */ + relativePublishTimeDescription?: (string|null); + + /** Review text */ + text?: (google.type.ILocalizedText|null); + + /** Review originalText */ + originalText?: (google.type.ILocalizedText|null); + + /** Review rating */ + rating?: (number|null); + + /** Review authorAttribution */ + authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); + + /** Review publishTime */ + publishTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Review. */ + class Review implements IReview { + + /** + * Constructs a new Review. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IReview); + + /** Review name. */ + public name: string; + + /** Review relativePublishTimeDescription. */ + public relativePublishTimeDescription: string; + + /** Review text. */ + public text?: (google.type.ILocalizedText|null); + + /** Review originalText. */ + public originalText?: (google.type.ILocalizedText|null); + + /** Review rating. */ + public rating: number; + + /** Review authorAttribution. */ + public authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); + + /** Review publishTime. */ + public publishTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Review instance using the specified properties. + * @param [properties] Properties to set + * @returns Review instance + */ + public static create(properties?: google.maps.places.v1.IReview): google.maps.places.v1.Review; + + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Review message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Review; + + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Review; + + /** + * Verifies a Review message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Review message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Review + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Review; + + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @param message Review + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Review, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Review to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Review + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContextualContent. */ + interface IContextualContent { + + /** ContextualContent reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); + + /** ContextualContent photos */ + photos?: (google.maps.places.v1.IPhoto[]|null); + + /** ContextualContent justifications */ + justifications?: (google.maps.places.v1.ContextualContent.IJustification[]|null); + } + + /** Represents a ContextualContent. */ + class ContextualContent implements IContextualContent { + + /** + * Constructs a new ContextualContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IContextualContent); + + /** ContextualContent reviews. */ + public reviews: google.maps.places.v1.IReview[]; + + /** ContextualContent photos. */ + public photos: google.maps.places.v1.IPhoto[]; + + /** ContextualContent justifications. */ + public justifications: google.maps.places.v1.ContextualContent.IJustification[]; + + /** + * Creates a new ContextualContent instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextualContent instance + */ + public static create(properties?: google.maps.places.v1.IContextualContent): google.maps.places.v1.ContextualContent; + + /** + * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @param message ContextualContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @param message ContextualContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContextualContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent; + + /** + * Decodes a ContextualContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent; + + /** + * Verifies a ContextualContent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextualContent + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent; + + /** + * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. + * @param message ContextualContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContextualContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContextualContent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContextualContent { + + /** Properties of a Justification. */ + interface IJustification { + + /** Justification reviewJustification */ + reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); + + /** Justification businessAvailabilityAttributesJustification */ + businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); + } + + /** Represents a Justification. */ + class Justification implements IJustification { + + /** + * Constructs a new Justification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.IJustification); + + /** Justification reviewJustification. */ + public reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); + + /** Justification businessAvailabilityAttributesJustification. */ + public businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); + + /** Justification justification. */ + public justification?: ("reviewJustification"|"businessAvailabilityAttributesJustification"); + + /** + * Creates a new Justification instance using the specified properties. + * @param [properties] Properties to set + * @returns Justification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.IJustification): google.maps.places.v1.ContextualContent.Justification; + + /** + * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @param message Justification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @param message Justification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Justification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification; + + /** + * Decodes a Justification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification; + + /** + * Verifies a Justification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Justification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Justification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification; + + /** + * Creates a plain object from a Justification message. Also converts values to other types if specified. + * @param message Justification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Justification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Justification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Justification { + + /** Properties of a ReviewJustification. */ + interface IReviewJustification { + + /** ReviewJustification highlightedText */ + highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); + + /** ReviewJustification review */ + review?: (google.maps.places.v1.IReview|null); + } + + /** Represents a ReviewJustification. */ + class ReviewJustification implements IReviewJustification { + + /** + * Constructs a new ReviewJustification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification); + + /** ReviewJustification highlightedText. */ + public highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); + + /** ReviewJustification review. */ + public review?: (google.maps.places.v1.IReview|null); + + /** + * Creates a new ReviewJustification instance using the specified properties. + * @param [properties] Properties to set + * @returns ReviewJustification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; + + /** + * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @param message ReviewJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @param message ReviewJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReviewJustification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; + + /** + * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; + + /** + * Verifies a ReviewJustification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReviewJustification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; + + /** + * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. + * @param message ReviewJustification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReviewJustification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReviewJustification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReviewJustification { + + /** Properties of a HighlightedText. */ + interface IHighlightedText { + + /** HighlightedText text */ + text?: (string|null); + + /** HighlightedText highlightedTextRanges */ + highlightedTextRanges?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]|null); + } + + /** Represents a HighlightedText. */ + class HighlightedText implements IHighlightedText { + + /** + * Constructs a new HighlightedText. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText); + + /** HighlightedText text. */ + public text: string; + + /** HighlightedText highlightedTextRanges. */ + public highlightedTextRanges: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]; + + /** + * Creates a new HighlightedText instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlightedText instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; + + /** + * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @param message HighlightedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @param message HighlightedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HighlightedText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; + + /** + * Decodes a HighlightedText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; + + /** + * Verifies a HighlightedText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HighlightedText + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; + + /** + * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. + * @param message HighlightedText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HighlightedText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HighlightedText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace HighlightedText { + + /** Properties of a HighlightedTextRange. */ + interface IHighlightedTextRange { + + /** HighlightedTextRange startIndex */ + startIndex?: (number|null); + + /** HighlightedTextRange endIndex */ + endIndex?: (number|null); + } + + /** Represents a HighlightedTextRange. */ + class HighlightedTextRange implements IHighlightedTextRange { + + /** + * Constructs a new HighlightedTextRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange); + + /** HighlightedTextRange startIndex. */ + public startIndex: number; + + /** HighlightedTextRange endIndex. */ + public endIndex: number; + + /** + * Creates a new HighlightedTextRange instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlightedTextRange instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @param message HighlightedTextRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @param message HighlightedTextRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Verifies a HighlightedTextRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HighlightedTextRange + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. + * @param message HighlightedTextRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HighlightedTextRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HighlightedTextRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a BusinessAvailabilityAttributesJustification. */ + interface IBusinessAvailabilityAttributesJustification { + + /** BusinessAvailabilityAttributesJustification takeout */ + takeout?: (boolean|null); + + /** BusinessAvailabilityAttributesJustification delivery */ + delivery?: (boolean|null); + + /** BusinessAvailabilityAttributesJustification dineIn */ + dineIn?: (boolean|null); + } + + /** Represents a BusinessAvailabilityAttributesJustification. */ + class BusinessAvailabilityAttributesJustification implements IBusinessAvailabilityAttributesJustification { + + /** + * Constructs a new BusinessAvailabilityAttributesJustification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification); + + /** BusinessAvailabilityAttributesJustification takeout. */ + public takeout: boolean; + + /** BusinessAvailabilityAttributesJustification delivery. */ + public delivery: boolean; + + /** BusinessAvailabilityAttributesJustification dineIn. */ + public dineIn: boolean; + + /** + * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. + * @param [properties] Properties to set + * @returns BusinessAvailabilityAttributesJustification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; + + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @param message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @param message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; + + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; + + /** + * Verifies a BusinessAvailabilityAttributesJustification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BusinessAvailabilityAttributesJustification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; + + /** + * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. + * @param message BusinessAvailabilityAttributesJustification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BusinessAvailabilityAttributesJustification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BusinessAvailabilityAttributesJustification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Photo. */ + interface IPhoto { + + /** Photo name */ + name?: (string|null); + + /** Photo widthPx */ + widthPx?: (number|null); + + /** Photo heightPx */ + heightPx?: (number|null); + + /** Photo authorAttributions */ + authorAttributions?: (google.maps.places.v1.IAuthorAttribution[]|null); + } + + /** Represents a Photo. */ + class Photo implements IPhoto { + + /** + * Constructs a new Photo. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPhoto); + + /** Photo name. */ + public name: string; + + /** Photo widthPx. */ + public widthPx: number; + + /** Photo heightPx. */ + public heightPx: number; + + /** Photo authorAttributions. */ + public authorAttributions: google.maps.places.v1.IAuthorAttribution[]; + + /** + * Creates a new Photo instance using the specified properties. + * @param [properties] Properties to set + * @returns Photo instance + */ + public static create(properties?: google.maps.places.v1.IPhoto): google.maps.places.v1.Photo; + + /** + * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @param message Photo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @param message Photo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Photo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Photo; + + /** + * Decodes a Photo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Photo; + + /** + * Verifies a Photo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Photo + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Photo; + + /** + * Creates a plain object from a Photo message. Also converts values to other types if specified. + * @param message Photo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Photo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Photo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Photo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a EVChargeOptions. */ + interface IEVChargeOptions { + + /** EVChargeOptions connectorCount */ + connectorCount?: (number|null); + + /** EVChargeOptions connectorAggregation */ + connectorAggregation?: (google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]|null); + } + + /** Represents a EVChargeOptions. */ + class EVChargeOptions implements IEVChargeOptions { + + /** + * Constructs a new EVChargeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IEVChargeOptions); + + /** EVChargeOptions connectorCount. */ + public connectorCount: number; + + /** EVChargeOptions connectorAggregation. */ + public connectorAggregation: google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]; + + /** + * Creates a new EVChargeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EVChargeOptions instance + */ + public static create(properties?: google.maps.places.v1.IEVChargeOptions): google.maps.places.v1.EVChargeOptions; + + /** + * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @param message EVChargeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @param message EVChargeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a EVChargeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions; + + /** + * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions; + + /** + * Verifies a EVChargeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EVChargeOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions; + + /** + * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. + * @param message EVChargeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.EVChargeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EVChargeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EVChargeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EVChargeOptions { + + /** Properties of a ConnectorAggregation. */ + interface IConnectorAggregation { + + /** ConnectorAggregation type */ + type?: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType|null); + + /** ConnectorAggregation maxChargeRateKw */ + maxChargeRateKw?: (number|null); + + /** ConnectorAggregation count */ + count?: (number|null); + + /** ConnectorAggregation availableCount */ + availableCount?: (number|null); + + /** ConnectorAggregation outOfServiceCount */ + outOfServiceCount?: (number|null); + + /** ConnectorAggregation availabilityLastUpdateTime */ + availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ConnectorAggregation. */ + class ConnectorAggregation implements IConnectorAggregation { + + /** + * Constructs a new ConnectorAggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation); + + /** ConnectorAggregation type. */ + public type: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType); + + /** ConnectorAggregation maxChargeRateKw. */ + public maxChargeRateKw: number; + + /** ConnectorAggregation count. */ + public count: number; + + /** ConnectorAggregation availableCount. */ + public availableCount?: (number|null); + + /** ConnectorAggregation outOfServiceCount. */ + public outOfServiceCount?: (number|null); + + /** ConnectorAggregation availabilityLastUpdateTime. */ + public availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectorAggregation _availableCount. */ + public _availableCount?: "availableCount"; + + /** ConnectorAggregation _outOfServiceCount. */ + public _outOfServiceCount?: "outOfServiceCount"; + + /** + * Creates a new ConnectorAggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectorAggregation instance + */ + public static create(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + + /** + * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @param message ConnectorAggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @param message ConnectorAggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + + /** + * Verifies a ConnectorAggregation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectorAggregation + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + + /** + * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. + * @param message ConnectorAggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.EVChargeOptions.ConnectorAggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectorAggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectorAggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** EVConnectorType enum. */ + enum EVConnectorType { + EV_CONNECTOR_TYPE_UNSPECIFIED = 0, + EV_CONNECTOR_TYPE_OTHER = 1, + EV_CONNECTOR_TYPE_J1772 = 2, + EV_CONNECTOR_TYPE_TYPE_2 = 3, + EV_CONNECTOR_TYPE_CHADEMO = 4, + EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5, + EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6, + EV_CONNECTOR_TYPE_TESLA = 7, + EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8, + EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9 + } + + /** Properties of a FuelOptions. */ + interface IFuelOptions { + + /** FuelOptions fuelPrices */ + fuelPrices?: (google.maps.places.v1.FuelOptions.IFuelPrice[]|null); + } + + /** Represents a FuelOptions. */ + class FuelOptions implements IFuelOptions { + + /** + * Constructs a new FuelOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IFuelOptions); + + /** FuelOptions fuelPrices. */ + public fuelPrices: google.maps.places.v1.FuelOptions.IFuelPrice[]; + + /** + * Creates a new FuelOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FuelOptions instance + */ + public static create(properties?: google.maps.places.v1.IFuelOptions): google.maps.places.v1.FuelOptions; + + /** + * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @param message FuelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @param message FuelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FuelOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions; + + /** + * Decodes a FuelOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions; + + /** + * Verifies a FuelOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FuelOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions; + + /** + * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. + * @param message FuelOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.FuelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FuelOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FuelOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FuelOptions { + + /** Properties of a FuelPrice. */ + interface IFuelPrice { + + /** FuelPrice type */ + type?: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null); + + /** FuelPrice price */ + price?: (google.type.IMoney|null); + + /** FuelPrice updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FuelPrice. */ + class FuelPrice implements IFuelPrice { + + /** + * Constructs a new FuelPrice. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.FuelOptions.IFuelPrice); + + /** FuelPrice type. */ + public type: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType); + + /** FuelPrice price. */ + public price?: (google.type.IMoney|null); + + /** FuelPrice updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FuelPrice instance using the specified properties. + * @param [properties] Properties to set + * @returns FuelPrice instance + */ + public static create(properties?: google.maps.places.v1.FuelOptions.IFuelPrice): google.maps.places.v1.FuelOptions.FuelPrice; + + /** + * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @param message FuelPrice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @param message FuelPrice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FuelPrice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions.FuelPrice; + + /** + * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions.FuelPrice; + + /** + * Verifies a FuelPrice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FuelPrice + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions.FuelPrice; + + /** + * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. + * @param message FuelPrice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.FuelOptions.FuelPrice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FuelPrice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FuelPrice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FuelPrice { + + /** FuelType enum. */ + enum FuelType { + FUEL_TYPE_UNSPECIFIED = 0, + DIESEL = 1, + REGULAR_UNLEADED = 2, + MIDGRADE = 3, + PREMIUM = 4, + SP91 = 5, + SP91_E10 = 6, + SP92 = 7, + SP95 = 8, + SP95_E10 = 9, + SP98 = 10, + SP99 = 11, + SP100 = 12, + LPG = 13, + E80 = 14, + E85 = 15, + METHANE = 16, + BIO_DIESEL = 17, + TRUCK_DIESEL = 18 + } + } + } + + /** Properties of a Circle. */ + interface ICircle { + + /** Circle center */ + center?: (google.type.ILatLng|null); + + /** Circle radius */ + radius?: (number|null); + } + + /** Represents a Circle. */ + class Circle implements ICircle { + + /** + * Constructs a new Circle. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ICircle); + + /** Circle center. */ + public center?: (google.type.ILatLng|null); + + /** Circle radius. */ + public radius: number; + + /** + * Creates a new Circle instance using the specified properties. + * @param [properties] Properties to set + * @returns Circle instance + */ + public static create(properties?: google.maps.places.v1.ICircle): google.maps.places.v1.Circle; + + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Circle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Circle; + + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Circle; + + /** + * Verifies a Circle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Circle + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Circle; + + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @param message Circle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Circle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Circle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Circle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place name */ + name?: (string|null); + + /** Place id */ + id?: (string|null); + + /** Place displayName */ + displayName?: (google.type.ILocalizedText|null); + + /** Place types */ + types?: (string[]|null); + + /** Place primaryType */ + primaryType?: (string|null); + + /** Place primaryTypeDisplayName */ + primaryTypeDisplayName?: (google.type.ILocalizedText|null); + + /** Place nationalPhoneNumber */ + nationalPhoneNumber?: (string|null); + + /** Place internationalPhoneNumber */ + internationalPhoneNumber?: (string|null); + + /** Place formattedAddress */ + formattedAddress?: (string|null); + + /** Place shortFormattedAddress */ + shortFormattedAddress?: (string|null); + + /** Place addressComponents */ + addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null); + + /** Place plusCode */ + plusCode?: (google.maps.places.v1.Place.IPlusCode|null); + + /** Place location */ + location?: (google.type.ILatLng|null); + + /** Place viewport */ + viewport?: (google.geo.type.IViewport|null); + + /** Place rating */ + rating?: (number|null); + + /** Place googleMapsUri */ + googleMapsUri?: (string|null); + + /** Place websiteUri */ + websiteUri?: (string|null); + + /** Place reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); + + /** Place regularOpeningHours */ + regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place utcOffsetMinutes */ + utcOffsetMinutes?: (number|null); + + /** Place photos */ + photos?: (google.maps.places.v1.IPhoto[]|null); + + /** Place adrFormatAddress */ + adrFormatAddress?: (string|null); + + /** Place businessStatus */ + businessStatus?: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus|null); + + /** Place priceLevel */ + priceLevel?: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel|null); + + /** Place attributions */ + attributions?: (google.maps.places.v1.Place.IAttribution[]|null); + + /** Place userRatingCount */ + userRatingCount?: (number|null); + + /** Place iconMaskBaseUri */ + iconMaskBaseUri?: (string|null); + + /** Place iconBackgroundColor */ + iconBackgroundColor?: (string|null); + + /** Place takeout */ + takeout?: (boolean|null); + + /** Place delivery */ + delivery?: (boolean|null); + + /** Place dineIn */ + dineIn?: (boolean|null); + + /** Place curbsidePickup */ + curbsidePickup?: (boolean|null); + + /** Place reservable */ + reservable?: (boolean|null); + + /** Place servesBreakfast */ + servesBreakfast?: (boolean|null); + + /** Place servesLunch */ + servesLunch?: (boolean|null); + + /** Place servesDinner */ + servesDinner?: (boolean|null); + + /** Place servesBeer */ + servesBeer?: (boolean|null); + + /** Place servesWine */ + servesWine?: (boolean|null); + + /** Place servesBrunch */ + servesBrunch?: (boolean|null); + + /** Place servesVegetarianFood */ + servesVegetarianFood?: (boolean|null); + + /** Place currentOpeningHours */ + currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place currentSecondaryOpeningHours */ + currentSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + + /** Place regularSecondaryOpeningHours */ + regularSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + + /** Place editorialSummary */ + editorialSummary?: (google.type.ILocalizedText|null); + + /** Place outdoorSeating */ + outdoorSeating?: (boolean|null); + + /** Place liveMusic */ + liveMusic?: (boolean|null); + + /** Place menuForChildren */ + menuForChildren?: (boolean|null); + + /** Place servesCocktails */ + servesCocktails?: (boolean|null); + + /** Place servesDessert */ + servesDessert?: (boolean|null); + + /** Place servesCoffee */ + servesCoffee?: (boolean|null); + + /** Place goodForChildren */ + goodForChildren?: (boolean|null); + + /** Place allowsDogs */ + allowsDogs?: (boolean|null); + + /** Place restroom */ + restroom?: (boolean|null); + + /** Place goodForGroups */ + goodForGroups?: (boolean|null); + + /** Place goodForWatchingSports */ + goodForWatchingSports?: (boolean|null); + + /** Place paymentOptions */ + paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); + + /** Place parkingOptions */ + parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); + + /** Place subDestinations */ + subDestinations?: (google.maps.places.v1.Place.ISubDestination[]|null); + + /** Place accessibilityOptions */ + accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); + + /** Place fuelOptions */ + fuelOptions?: (google.maps.places.v1.IFuelOptions|null); + + /** Place evChargeOptions */ + evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); + + /** Place generativeSummary */ + generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); + + /** Place areaSummary */ + areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPlace); + + /** Place name. */ + public name: string; + + /** Place id. */ + public id: string; + + /** Place displayName. */ + public displayName?: (google.type.ILocalizedText|null); + + /** Place types. */ + public types: string[]; + + /** Place primaryType. */ + public primaryType: string; + + /** Place primaryTypeDisplayName. */ + public primaryTypeDisplayName?: (google.type.ILocalizedText|null); + + /** Place nationalPhoneNumber. */ + public nationalPhoneNumber: string; + + /** Place internationalPhoneNumber. */ + public internationalPhoneNumber: string; + + /** Place formattedAddress. */ + public formattedAddress: string; + + /** Place shortFormattedAddress. */ + public shortFormattedAddress: string; + + /** Place addressComponents. */ + public addressComponents: google.maps.places.v1.Place.IAddressComponent[]; + + /** Place plusCode. */ + public plusCode?: (google.maps.places.v1.Place.IPlusCode|null); + + /** Place location. */ + public location?: (google.type.ILatLng|null); + + /** Place viewport. */ + public viewport?: (google.geo.type.IViewport|null); + + /** Place rating. */ + public rating: number; + + /** Place googleMapsUri. */ + public googleMapsUri: string; + + /** Place websiteUri. */ + public websiteUri: string; + + /** Place reviews. */ + public reviews: google.maps.places.v1.IReview[]; + + /** Place regularOpeningHours. */ + public regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place utcOffsetMinutes. */ + public utcOffsetMinutes?: (number|null); + + /** Place photos. */ + public photos: google.maps.places.v1.IPhoto[]; + + /** Place adrFormatAddress. */ + public adrFormatAddress: string; + + /** Place businessStatus. */ + public businessStatus: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus); + + /** Place priceLevel. */ + public priceLevel: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel); + + /** Place attributions. */ + public attributions: google.maps.places.v1.Place.IAttribution[]; + + /** Place userRatingCount. */ + public userRatingCount?: (number|null); + + /** Place iconMaskBaseUri. */ + public iconMaskBaseUri: string; + + /** Place iconBackgroundColor. */ + public iconBackgroundColor: string; + + /** Place takeout. */ + public takeout?: (boolean|null); + + /** Place delivery. */ + public delivery?: (boolean|null); + + /** Place dineIn. */ + public dineIn?: (boolean|null); + + /** Place curbsidePickup. */ + public curbsidePickup?: (boolean|null); + + /** Place reservable. */ + public reservable?: (boolean|null); + + /** Place servesBreakfast. */ + public servesBreakfast?: (boolean|null); + + /** Place servesLunch. */ + public servesLunch?: (boolean|null); + + /** Place servesDinner. */ + public servesDinner?: (boolean|null); + + /** Place servesBeer. */ + public servesBeer?: (boolean|null); + + /** Place servesWine. */ + public servesWine?: (boolean|null); + + /** Place servesBrunch. */ + public servesBrunch?: (boolean|null); + + /** Place servesVegetarianFood. */ + public servesVegetarianFood?: (boolean|null); + + /** Place currentOpeningHours. */ + public currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place currentSecondaryOpeningHours. */ + public currentSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + + /** Place regularSecondaryOpeningHours. */ + public regularSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + + /** Place editorialSummary. */ + public editorialSummary?: (google.type.ILocalizedText|null); + + /** Place outdoorSeating. */ + public outdoorSeating?: (boolean|null); + + /** Place liveMusic. */ + public liveMusic?: (boolean|null); + + /** Place menuForChildren. */ + public menuForChildren?: (boolean|null); + + /** Place servesCocktails. */ + public servesCocktails?: (boolean|null); + + /** Place servesDessert. */ + public servesDessert?: (boolean|null); + + /** Place servesCoffee. */ + public servesCoffee?: (boolean|null); + + /** Place goodForChildren. */ + public goodForChildren?: (boolean|null); + + /** Place allowsDogs. */ + public allowsDogs?: (boolean|null); + + /** Place restroom. */ + public restroom?: (boolean|null); + + /** Place goodForGroups. */ + public goodForGroups?: (boolean|null); + + /** Place goodForWatchingSports. */ + public goodForWatchingSports?: (boolean|null); + + /** Place paymentOptions. */ + public paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); + + /** Place parkingOptions. */ + public parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); + + /** Place subDestinations. */ + public subDestinations: google.maps.places.v1.Place.ISubDestination[]; + + /** Place accessibilityOptions. */ + public accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); + + /** Place fuelOptions. */ + public fuelOptions?: (google.maps.places.v1.IFuelOptions|null); + + /** Place evChargeOptions. */ + public evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); + + /** Place generativeSummary. */ + public generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); + + /** Place areaSummary. */ + public areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); + + /** Place _utcOffsetMinutes. */ + public _utcOffsetMinutes?: "utcOffsetMinutes"; + + /** Place _userRatingCount. */ + public _userRatingCount?: "userRatingCount"; + + /** Place _takeout. */ + public _takeout?: "takeout"; + + /** Place _delivery. */ + public _delivery?: "delivery"; + + /** Place _dineIn. */ + public _dineIn?: "dineIn"; + + /** Place _curbsidePickup. */ + public _curbsidePickup?: "curbsidePickup"; + + /** Place _reservable. */ + public _reservable?: "reservable"; + + /** Place _servesBreakfast. */ + public _servesBreakfast?: "servesBreakfast"; + + /** Place _servesLunch. */ + public _servesLunch?: "servesLunch"; + + /** Place _servesDinner. */ + public _servesDinner?: "servesDinner"; + + /** Place _servesBeer. */ + public _servesBeer?: "servesBeer"; + + /** Place _servesWine. */ + public _servesWine?: "servesWine"; + + /** Place _servesBrunch. */ + public _servesBrunch?: "servesBrunch"; + + /** Place _servesVegetarianFood. */ + public _servesVegetarianFood?: "servesVegetarianFood"; + + /** Place _outdoorSeating. */ + public _outdoorSeating?: "outdoorSeating"; + + /** Place _liveMusic. */ + public _liveMusic?: "liveMusic"; + + /** Place _menuForChildren. */ + public _menuForChildren?: "menuForChildren"; + + /** Place _servesCocktails. */ + public _servesCocktails?: "servesCocktails"; + + /** Place _servesDessert. */ + public _servesDessert?: "servesDessert"; + + /** Place _servesCoffee. */ + public _servesCoffee?: "servesCoffee"; + + /** Place _goodForChildren. */ + public _goodForChildren?: "goodForChildren"; + + /** Place _allowsDogs. */ + public _allowsDogs?: "allowsDogs"; + + /** Place _restroom. */ + public _restroom?: "restroom"; + + /** Place _goodForGroups. */ + public _goodForGroups?: "goodForGroups"; + + /** Place _goodForWatchingSports. */ + public _goodForWatchingSports?: "goodForWatchingSports"; + + /** Place _accessibilityOptions. */ + public _accessibilityOptions?: "accessibilityOptions"; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: google.maps.places.v1.IPlace): google.maps.places.v1.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place; + + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Place { + + /** Properties of an AddressComponent. */ + interface IAddressComponent { + + /** AddressComponent longText */ + longText?: (string|null); + + /** AddressComponent shortText */ + shortText?: (string|null); + + /** AddressComponent types */ + types?: (string[]|null); + + /** AddressComponent languageCode */ + languageCode?: (string|null); + } + + /** Represents an AddressComponent. */ + class AddressComponent implements IAddressComponent { + + /** + * Constructs a new AddressComponent. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAddressComponent); + + /** AddressComponent longText. */ + public longText: string; + + /** AddressComponent shortText. */ + public shortText: string; + + /** AddressComponent types. */ + public types: string[]; + + /** AddressComponent languageCode. */ + public languageCode: string; + + /** + * Creates a new AddressComponent instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressComponent instance + */ + public static create(properties?: google.maps.places.v1.Place.IAddressComponent): google.maps.places.v1.Place.AddressComponent; + + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AddressComponent; + + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AddressComponent; + + /** + * Verifies an AddressComponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressComponent + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AddressComponent; + + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @param message AddressComponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddressComponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddressComponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlusCode. */ + interface IPlusCode { + + /** PlusCode globalCode */ + globalCode?: (string|null); + + /** PlusCode compoundCode */ + compoundCode?: (string|null); + } + + /** Represents a PlusCode. */ + class PlusCode implements IPlusCode { + + /** + * Constructs a new PlusCode. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IPlusCode); + + /** PlusCode globalCode. */ + public globalCode: string; + + /** PlusCode compoundCode. */ + public compoundCode: string; + + /** + * Creates a new PlusCode instance using the specified properties. + * @param [properties] Properties to set + * @returns PlusCode instance + */ + public static create(properties?: google.maps.places.v1.Place.IPlusCode): google.maps.places.v1.Place.PlusCode; + + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PlusCode; + + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PlusCode; + + /** + * Verifies a PlusCode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlusCode + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PlusCode; + + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @param message PlusCode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlusCode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlusCode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpeningHours. */ + interface IOpeningHours { + + /** OpeningHours openNow */ + openNow?: (boolean|null); + + /** OpeningHours periods */ + periods?: (google.maps.places.v1.Place.OpeningHours.IPeriod[]|null); + + /** OpeningHours weekdayDescriptions */ + weekdayDescriptions?: (string[]|null); + + /** OpeningHours secondaryHoursType */ + secondaryHoursType?: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null); + + /** OpeningHours specialDays */ + specialDays?: (google.maps.places.v1.Place.OpeningHours.ISpecialDay[]|null); + } + + /** Represents an OpeningHours. */ + class OpeningHours implements IOpeningHours { + + /** + * Constructs a new OpeningHours. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IOpeningHours); + + /** OpeningHours openNow. */ + public openNow?: (boolean|null); + + /** OpeningHours periods. */ + public periods: google.maps.places.v1.Place.OpeningHours.IPeriod[]; + + /** OpeningHours weekdayDescriptions. */ + public weekdayDescriptions: string[]; + + /** OpeningHours secondaryHoursType. */ + public secondaryHoursType: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType); + + /** OpeningHours specialDays. */ + public specialDays: google.maps.places.v1.Place.OpeningHours.ISpecialDay[]; + + /** OpeningHours _openNow. */ + public _openNow?: "openNow"; + + /** + * Creates a new OpeningHours instance using the specified properties. + * @param [properties] Properties to set + * @returns OpeningHours instance + */ + public static create(properties?: google.maps.places.v1.Place.IOpeningHours): google.maps.places.v1.Place.OpeningHours; + + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours; + + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours; + + /** + * Verifies an OpeningHours message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpeningHours + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours; + + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @param message OpeningHours + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpeningHours to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpeningHours + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpeningHours { + + /** Properties of a Period. */ + interface IPeriod { + + /** Period open */ + open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + + /** Period close */ + close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + } + + /** Represents a Period. */ + class Period implements IPeriod { + + /** + * Constructs a new Period. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod); + + /** Period open. */ + public open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + + /** Period close. */ + public close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + + /** + * Creates a new Period instance using the specified properties. + * @param [properties] Properties to set + * @returns Period instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod): google.maps.places.v1.Place.OpeningHours.Period; + + /** + * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Period message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period; + + /** + * Verifies a Period message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Period + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @param message Period + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Period to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Period + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Period { + + /** Properties of a Point. */ + interface IPoint { + + /** Point day */ + day?: (number|null); + + /** Point hour */ + hour?: (number|null); + + /** Point minute */ + minute?: (number|null); + + /** Point date */ + date?: (google.type.IDate|null); + + /** Point truncated */ + truncated?: (boolean|null); + } + + /** Represents a Point. */ + class Point implements IPoint { + + /** + * Constructs a new Point. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint); + + /** Point day. */ + public day?: (number|null); + + /** Point hour. */ + public hour?: (number|null); + + /** Point minute. */ + public minute?: (number|null); + + /** Point date. */ + public date?: (google.type.IDate|null); + + /** Point truncated. */ + public truncated: boolean; + + /** Point _day. */ + public _day?: "day"; + + /** Point _hour. */ + public _hour?: "hour"; + + /** Point _minute. */ + public _minute?: "minute"; + + /** + * Creates a new Point instance using the specified properties. + * @param [properties] Properties to set + * @returns Point instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint): google.maps.places.v1.Place.OpeningHours.Period.Point; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Point message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period.Point; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period.Point; + + /** + * Verifies a Point message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Point + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period.Point; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @param message Point + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Point to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** SecondaryHoursType enum. */ + enum SecondaryHoursType { + SECONDARY_HOURS_TYPE_UNSPECIFIED = 0, + DRIVE_THROUGH = 1, + HAPPY_HOUR = 2, + DELIVERY = 3, + TAKEOUT = 4, + KITCHEN = 5, + BREAKFAST = 6, + LUNCH = 7, + DINNER = 8, + BRUNCH = 9, + PICKUP = 10, + ACCESS = 11, + SENIOR_HOURS = 12, + ONLINE_SERVICE_HOURS = 13 + } + + /** Properties of a SpecialDay. */ + interface ISpecialDay { + + /** SpecialDay date */ + date?: (google.type.IDate|null); + } + + /** Represents a SpecialDay. */ + class SpecialDay implements ISpecialDay { + + /** + * Constructs a new SpecialDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay); + + /** SpecialDay date. */ + public date?: (google.type.IDate|null); + + /** + * Creates a new SpecialDay instance using the specified properties. + * @param [properties] Properties to set + * @returns SpecialDay instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Verifies a SpecialDay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpecialDay + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @param message SpecialDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.SpecialDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpecialDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpecialDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** BusinessStatus enum. */ + enum BusinessStatus { + BUSINESS_STATUS_UNSPECIFIED = 0, + OPERATIONAL = 1, + CLOSED_TEMPORARILY = 2, + CLOSED_PERMANENTLY = 3 + } + + /** Properties of an Attribution. */ + interface IAttribution { + + /** Attribution provider */ + provider?: (string|null); + + /** Attribution providerUri */ + providerUri?: (string|null); + } + + /** Represents an Attribution. */ + class Attribution implements IAttribution { + + /** + * Constructs a new Attribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAttribution); + + /** Attribution provider. */ + public provider: string; + + /** Attribution providerUri. */ + public providerUri: string; + + /** + * Creates a new Attribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Attribution instance + */ + public static create(properties?: google.maps.places.v1.Place.IAttribution): google.maps.places.v1.Place.Attribution; + + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Attribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.Attribution; + + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.Attribution; + + /** + * Verifies an Attribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Attribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Attribution + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Attribution; + + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @param message Attribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.Attribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Attribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Attribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PaymentOptions. */ + interface IPaymentOptions { + + /** PaymentOptions acceptsCreditCards */ + acceptsCreditCards?: (boolean|null); + + /** PaymentOptions acceptsDebitCards */ + acceptsDebitCards?: (boolean|null); + + /** PaymentOptions acceptsCashOnly */ + acceptsCashOnly?: (boolean|null); + + /** PaymentOptions acceptsNfc */ + acceptsNfc?: (boolean|null); + } + + /** Represents a PaymentOptions. */ + class PaymentOptions implements IPaymentOptions { + + /** + * Constructs a new PaymentOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IPaymentOptions); + + /** PaymentOptions acceptsCreditCards. */ + public acceptsCreditCards?: (boolean|null); + + /** PaymentOptions acceptsDebitCards. */ + public acceptsDebitCards?: (boolean|null); + + /** PaymentOptions acceptsCashOnly. */ + public acceptsCashOnly?: (boolean|null); + + /** PaymentOptions acceptsNfc. */ + public acceptsNfc?: (boolean|null); + + /** PaymentOptions _acceptsCreditCards. */ + public _acceptsCreditCards?: "acceptsCreditCards"; + + /** PaymentOptions _acceptsDebitCards. */ + public _acceptsDebitCards?: "acceptsDebitCards"; + + /** PaymentOptions _acceptsCashOnly. */ + public _acceptsCashOnly?: "acceptsCashOnly"; + + /** PaymentOptions _acceptsNfc. */ + public _acceptsNfc?: "acceptsNfc"; + + /** + * Creates a new PaymentOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IPaymentOptions): google.maps.places.v1.Place.PaymentOptions; + + /** + * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @param message PaymentOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @param message PaymentOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PaymentOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PaymentOptions; + + /** + * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PaymentOptions; + + /** + * Verifies a PaymentOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PaymentOptions; + + /** + * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. + * @param message PaymentOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.PaymentOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PaymentOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParkingOptions. */ + interface IParkingOptions { + + /** ParkingOptions freeParkingLot */ + freeParkingLot?: (boolean|null); + + /** ParkingOptions paidParkingLot */ + paidParkingLot?: (boolean|null); + + /** ParkingOptions freeStreetParking */ + freeStreetParking?: (boolean|null); + + /** ParkingOptions paidStreetParking */ + paidStreetParking?: (boolean|null); + + /** ParkingOptions valetParking */ + valetParking?: (boolean|null); + + /** ParkingOptions freeGarageParking */ + freeGarageParking?: (boolean|null); + + /** ParkingOptions paidGarageParking */ + paidGarageParking?: (boolean|null); + } + + /** Represents a ParkingOptions. */ + class ParkingOptions implements IParkingOptions { + + /** + * Constructs a new ParkingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IParkingOptions); + + /** ParkingOptions freeParkingLot. */ + public freeParkingLot?: (boolean|null); + + /** ParkingOptions paidParkingLot. */ + public paidParkingLot?: (boolean|null); + + /** ParkingOptions freeStreetParking. */ + public freeStreetParking?: (boolean|null); + + /** ParkingOptions paidStreetParking. */ + public paidStreetParking?: (boolean|null); + + /** ParkingOptions valetParking. */ + public valetParking?: (boolean|null); + + /** ParkingOptions freeGarageParking. */ + public freeGarageParking?: (boolean|null); + + /** ParkingOptions paidGarageParking. */ + public paidGarageParking?: (boolean|null); + + /** ParkingOptions _freeParkingLot. */ + public _freeParkingLot?: "freeParkingLot"; + + /** ParkingOptions _paidParkingLot. */ + public _paidParkingLot?: "paidParkingLot"; + + /** ParkingOptions _freeStreetParking. */ + public _freeStreetParking?: "freeStreetParking"; + + /** ParkingOptions _paidStreetParking. */ + public _paidStreetParking?: "paidStreetParking"; + + /** ParkingOptions _valetParking. */ + public _valetParking?: "valetParking"; + + /** ParkingOptions _freeGarageParking. */ + public _freeGarageParking?: "freeGarageParking"; + + /** ParkingOptions _paidGarageParking. */ + public _paidGarageParking?: "paidGarageParking"; + + /** + * Creates a new ParkingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ParkingOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IParkingOptions): google.maps.places.v1.Place.ParkingOptions; + + /** + * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @param message ParkingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @param message ParkingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParkingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.ParkingOptions; + + /** + * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.ParkingOptions; + + /** + * Verifies a ParkingOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParkingOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.ParkingOptions; + + /** + * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. + * @param message ParkingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.ParkingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParkingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParkingOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SubDestination. */ + interface ISubDestination { + + /** SubDestination name */ + name?: (string|null); + + /** SubDestination id */ + id?: (string|null); + } + + /** Represents a SubDestination. */ + class SubDestination implements ISubDestination { + + /** + * Constructs a new SubDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.ISubDestination); + + /** SubDestination name. */ + public name: string; + + /** SubDestination id. */ + public id: string; + + /** + * Creates a new SubDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns SubDestination instance + */ + public static create(properties?: google.maps.places.v1.Place.ISubDestination): google.maps.places.v1.Place.SubDestination; + + /** + * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @param message SubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @param message SubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.SubDestination; + + /** + * Decodes a SubDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.SubDestination; + + /** + * Verifies a SubDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubDestination + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.SubDestination; + + /** + * Creates a plain object from a SubDestination message. Also converts values to other types if specified. + * @param message SubDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.SubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessibilityOptions. */ + interface IAccessibilityOptions { + + /** AccessibilityOptions wheelchairAccessibleParking */ + wheelchairAccessibleParking?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleEntrance */ + wheelchairAccessibleEntrance?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleRestroom */ + wheelchairAccessibleRestroom?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleSeating */ + wheelchairAccessibleSeating?: (boolean|null); + } + + /** Represents an AccessibilityOptions. */ + class AccessibilityOptions implements IAccessibilityOptions { + + /** + * Constructs a new AccessibilityOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAccessibilityOptions); + + /** AccessibilityOptions wheelchairAccessibleParking. */ + public wheelchairAccessibleParking?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleEntrance. */ + public wheelchairAccessibleEntrance?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleRestroom. */ + public wheelchairAccessibleRestroom?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleSeating. */ + public wheelchairAccessibleSeating?: (boolean|null); + + /** AccessibilityOptions _wheelchairAccessibleParking. */ + public _wheelchairAccessibleParking?: "wheelchairAccessibleParking"; + + /** AccessibilityOptions _wheelchairAccessibleEntrance. */ + public _wheelchairAccessibleEntrance?: "wheelchairAccessibleEntrance"; + + /** AccessibilityOptions _wheelchairAccessibleRestroom. */ + public _wheelchairAccessibleRestroom?: "wheelchairAccessibleRestroom"; + + /** AccessibilityOptions _wheelchairAccessibleSeating. */ + public _wheelchairAccessibleSeating?: "wheelchairAccessibleSeating"; + + /** + * Creates a new AccessibilityOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessibilityOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IAccessibilityOptions): google.maps.places.v1.Place.AccessibilityOptions; + + /** + * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @param message AccessibilityOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @param message AccessibilityOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AccessibilityOptions; + + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AccessibilityOptions; + + /** + * Verifies an AccessibilityOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessibilityOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AccessibilityOptions; + + /** + * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. + * @param message AccessibilityOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AccessibilityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessibilityOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessibilityOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerativeSummary. */ + interface IGenerativeSummary { + + /** GenerativeSummary overview */ + overview?: (google.type.ILocalizedText|null); + + /** GenerativeSummary description */ + description?: (google.type.ILocalizedText|null); + + /** GenerativeSummary references */ + references?: (google.maps.places.v1.IReferences|null); + } + + /** Represents a GenerativeSummary. */ + class GenerativeSummary implements IGenerativeSummary { + + /** + * Constructs a new GenerativeSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IGenerativeSummary); + + /** GenerativeSummary overview. */ + public overview?: (google.type.ILocalizedText|null); + + /** GenerativeSummary description. */ + public description?: (google.type.ILocalizedText|null); + + /** GenerativeSummary references. */ + public references?: (google.maps.places.v1.IReferences|null); + + /** + * Creates a new GenerativeSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerativeSummary instance + */ + public static create(properties?: google.maps.places.v1.Place.IGenerativeSummary): google.maps.places.v1.Place.GenerativeSummary; + + /** + * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @param message GenerativeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @param message GenerativeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerativeSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.GenerativeSummary; + + /** + * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.GenerativeSummary; + + /** + * Verifies a GenerativeSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerativeSummary + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.GenerativeSummary; + + /** + * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. + * @param message GenerativeSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.GenerativeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerativeSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerativeSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AreaSummary. */ + interface IAreaSummary { + + /** AreaSummary contentBlocks */ + contentBlocks?: (google.maps.places.v1.IContentBlock[]|null); + } + + /** Represents an AreaSummary. */ + class AreaSummary implements IAreaSummary { + + /** + * Constructs a new AreaSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAreaSummary); + + /** AreaSummary contentBlocks. */ + public contentBlocks: google.maps.places.v1.IContentBlock[]; + + /** + * Creates a new AreaSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns AreaSummary instance + */ + public static create(properties?: google.maps.places.v1.Place.IAreaSummary): google.maps.places.v1.Place.AreaSummary; + + /** + * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @param message AreaSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @param message AreaSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AreaSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AreaSummary; + + /** + * Decodes an AreaSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AreaSummary; + + /** + * Verifies an AreaSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AreaSummary + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AreaSummary; + + /** + * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. + * @param message AreaSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AreaSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AreaSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AreaSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** PriceLevel enum. */ + enum PriceLevel { + PRICE_LEVEL_UNSPECIFIED = 0, + PRICE_LEVEL_FREE = 1, + PRICE_LEVEL_INEXPENSIVE = 2, + PRICE_LEVEL_MODERATE = 3, + PRICE_LEVEL_EXPENSIVE = 4, + PRICE_LEVEL_VERY_EXPENSIVE = 5 + } + + /** Represents a Places */ + class Places extends $protobuf.rpc.Service { + + /** + * Constructs a new Places service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Places service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Places; + + /** + * Calls SearchNearby. + * @param request SearchNearbyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchNearbyResponse + */ + public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest, callback: google.maps.places.v1.Places.SearchNearbyCallback): void; + + /** + * Calls SearchNearby. + * @param request SearchNearbyRequest message or plain object + * @returns Promise + */ + public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest): Promise; + + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchTextResponse + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest, callback: google.maps.places.v1.Places.SearchTextCallback): void; + + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @returns Promise + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest): Promise; + + /** + * Calls GetPhotoMedia. + * @param request GetPhotoMediaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PhotoMedia + */ + public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest, callback: google.maps.places.v1.Places.GetPhotoMediaCallback): void; + + /** + * Calls GetPhotoMedia. + * @param request GetPhotoMediaRequest message or plain object + * @returns Promise + */ + public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest): Promise; + + /** + * Calls GetPlace. + * @param request GetPlaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Place + */ + public getPlace(request: google.maps.places.v1.IGetPlaceRequest, callback: google.maps.places.v1.Places.GetPlaceCallback): void; + + /** + * Calls GetPlace. + * @param request GetPlaceRequest message or plain object + * @returns Promise + */ + public getPlace(request: google.maps.places.v1.IGetPlaceRequest): Promise; + + /** + * Calls AutocompletePlaces. + * @param request AutocompletePlacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutocompletePlacesResponse + */ + public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest, callback: google.maps.places.v1.Places.AutocompletePlacesCallback): void; + + /** + * Calls AutocompletePlaces. + * @param request AutocompletePlacesRequest message or plain object + * @returns Promise + */ + public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest): Promise; + } + + namespace Places { + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. + * @param error Error, if any + * @param [response] SearchNearbyResponse + */ + type SearchNearbyCallback = (error: (Error|null), response?: google.maps.places.v1.SearchNearbyResponse) => void; + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @param error Error, if any + * @param [response] SearchTextResponse + */ + type SearchTextCallback = (error: (Error|null), response?: google.maps.places.v1.SearchTextResponse) => void; + + /** + * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. + * @param error Error, if any + * @param [response] PhotoMedia + */ + type GetPhotoMediaCallback = (error: (Error|null), response?: google.maps.places.v1.PhotoMedia) => void; + + /** + * Callback as used by {@link google.maps.places.v1.Places|getPlace}. + * @param error Error, if any + * @param [response] Place + */ + type GetPlaceCallback = (error: (Error|null), response?: google.maps.places.v1.Place) => void; + + /** + * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. + * @param error Error, if any + * @param [response] AutocompletePlacesResponse + */ + type AutocompletePlacesCallback = (error: (Error|null), response?: google.maps.places.v1.AutocompletePlacesResponse) => void; + } + + /** Properties of a SearchNearbyRequest. */ + interface ISearchNearbyRequest { + + /** SearchNearbyRequest languageCode */ + languageCode?: (string|null); + + /** SearchNearbyRequest regionCode */ + regionCode?: (string|null); + + /** SearchNearbyRequest includedTypes */ + includedTypes?: (string[]|null); + + /** SearchNearbyRequest excludedTypes */ + excludedTypes?: (string[]|null); + + /** SearchNearbyRequest includedPrimaryTypes */ + includedPrimaryTypes?: (string[]|null); + + /** SearchNearbyRequest excludedPrimaryTypes */ + excludedPrimaryTypes?: (string[]|null); + + /** SearchNearbyRequest maxResultCount */ + maxResultCount?: (number|null); + + /** SearchNearbyRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); + + /** SearchNearbyRequest rankPreference */ + rankPreference?: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference|null); + } + + /** Represents a SearchNearbyRequest. */ + class SearchNearbyRequest implements ISearchNearbyRequest { + + /** + * Constructs a new SearchNearbyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchNearbyRequest); + + /** SearchNearbyRequest languageCode. */ + public languageCode: string; + + /** SearchNearbyRequest regionCode. */ + public regionCode: string; + + /** SearchNearbyRequest includedTypes. */ + public includedTypes: string[]; + + /** SearchNearbyRequest excludedTypes. */ + public excludedTypes: string[]; + + /** SearchNearbyRequest includedPrimaryTypes. */ + public includedPrimaryTypes: string[]; + + /** SearchNearbyRequest excludedPrimaryTypes. */ + public excludedPrimaryTypes: string[]; + + /** SearchNearbyRequest maxResultCount. */ + public maxResultCount: number; + + /** SearchNearbyRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); + + /** SearchNearbyRequest rankPreference. */ + public rankPreference: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference); + + /** + * Creates a new SearchNearbyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchNearbyRequest instance + */ + public static create(properties?: google.maps.places.v1.ISearchNearbyRequest): google.maps.places.v1.SearchNearbyRequest; + + /** + * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @param message SearchNearbyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @param message SearchNearbyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest; + + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest; + + /** + * Verifies a SearchNearbyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchNearbyRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest; + + /** + * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. + * @param message SearchNearbyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchNearbyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchNearbyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchNearbyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchNearbyRequest { + + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { + + /** LocationRestriction circle */ + circle?: (google.maps.places.v1.ICircle|null); + } + + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { + + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction); + + /** LocationRestriction circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationRestriction type. */ + public type?: "circle"; + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + + /** + * Verifies a LocationRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchNearbyRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RankPreference enum. */ + enum RankPreference { + RANK_PREFERENCE_UNSPECIFIED = 0, + DISTANCE = 1, + POPULARITY = 2 + } + } + + /** Properties of a SearchNearbyResponse. */ + interface ISearchNearbyResponse { + + /** SearchNearbyResponse places */ + places?: (google.maps.places.v1.IPlace[]|null); + } + + /** Represents a SearchNearbyResponse. */ + class SearchNearbyResponse implements ISearchNearbyResponse { + + /** + * Constructs a new SearchNearbyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchNearbyResponse); + + /** SearchNearbyResponse places. */ + public places: google.maps.places.v1.IPlace[]; + + /** + * Creates a new SearchNearbyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchNearbyResponse instance + */ + public static create(properties?: google.maps.places.v1.ISearchNearbyResponse): google.maps.places.v1.SearchNearbyResponse; + + /** + * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @param message SearchNearbyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @param message SearchNearbyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchNearbyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyResponse; + + /** + * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyResponse; + + /** + * Verifies a SearchNearbyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchNearbyResponse + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyResponse; + + /** + * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. + * @param message SearchNearbyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchNearbyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchNearbyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchNearbyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchTextRequest. */ + interface ISearchTextRequest { + + /** SearchTextRequest textQuery */ + textQuery?: (string|null); + + /** SearchTextRequest languageCode */ + languageCode?: (string|null); + + /** SearchTextRequest regionCode */ + regionCode?: (string|null); + + /** SearchTextRequest rankPreference */ + rankPreference?: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference|null); + + /** SearchTextRequest includedType */ + includedType?: (string|null); + + /** SearchTextRequest openNow */ + openNow?: (boolean|null); + + /** SearchTextRequest minRating */ + minRating?: (number|null); + + /** SearchTextRequest maxResultCount */ + maxResultCount?: (number|null); + + /** SearchTextRequest priceLevels */ + priceLevels?: (google.maps.places.v1.PriceLevel[]|null); + + /** SearchTextRequest strictTypeFiltering */ + strictTypeFiltering?: (boolean|null); + + /** SearchTextRequest locationBias */ + locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + + /** SearchTextRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + + /** SearchTextRequest evOptions */ + evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); + } + + /** Represents a SearchTextRequest. */ + class SearchTextRequest implements ISearchTextRequest { + + /** + * Constructs a new SearchTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchTextRequest); + + /** SearchTextRequest textQuery. */ + public textQuery: string; + + /** SearchTextRequest languageCode. */ + public languageCode: string; + + /** SearchTextRequest regionCode. */ + public regionCode: string; + + /** SearchTextRequest rankPreference. */ + public rankPreference: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference); + + /** SearchTextRequest includedType. */ + public includedType: string; + + /** SearchTextRequest openNow. */ + public openNow: boolean; + + /** SearchTextRequest minRating. */ + public minRating: number; + + /** SearchTextRequest maxResultCount. */ + public maxResultCount: number; + + /** SearchTextRequest priceLevels. */ + public priceLevels: google.maps.places.v1.PriceLevel[]; + + /** SearchTextRequest strictTypeFiltering. */ + public strictTypeFiltering: boolean; + + /** SearchTextRequest locationBias. */ + public locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + + /** SearchTextRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + + /** SearchTextRequest evOptions. */ + public evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); + + /** + * Creates a new SearchTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchTextRequest instance + */ + public static create(properties?: google.maps.places.v1.ISearchTextRequest): google.maps.places.v1.SearchTextRequest; + + /** + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest; + + /** + * Verifies a SearchTextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest; + + /** + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @param message SearchTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchTextRequest { + + /** RankPreference enum. */ + enum RankPreference { + RANK_PREFERENCE_UNSPECIFIED = 0, + DISTANCE = 1, + RELEVANCE = 2 + } + + /** Properties of a LocationBias. */ + interface ILocationBias { + + /** LocationBias rectangle */ + rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle */ + circle?: (google.maps.places.v1.ICircle|null); + } + + /** Represents a LocationBias. */ + class LocationBias implements ILocationBias { + + /** + * Constructs a new LocationBias. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias); + + /** LocationBias rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationBias type. */ + public type?: ("rectangle"|"circle"); + + /** + * Creates a new LocationBias instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationBias instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Verifies a LocationBias message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationBias + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @param message LocationBias + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationBias to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationBias + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { + + /** LocationRestriction rectangle */ + rectangle?: (google.geo.type.IViewport|null); + } + + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { + + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction); + + /** LocationRestriction rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationRestriction type. */ + public type?: "rectangle"; + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Verifies a LocationRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a EVOptions. */ + interface IEVOptions { + + /** EVOptions minimumChargingRateKw */ + minimumChargingRateKw?: (number|null); + + /** EVOptions connectorTypes */ + connectorTypes?: (google.maps.places.v1.EVConnectorType[]|null); + } + + /** Represents a EVOptions. */ + class EVOptions implements IEVOptions { + + /** + * Constructs a new EVOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions); + + /** EVOptions minimumChargingRateKw. */ + public minimumChargingRateKw: number; + + /** EVOptions connectorTypes. */ + public connectorTypes: google.maps.places.v1.EVConnectorType[]; + + /** + * Creates a new EVOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EVOptions instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions): google.maps.places.v1.SearchTextRequest.EVOptions; + + /** + * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @param message EVOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @param message EVOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a EVOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.EVOptions; + + /** + * Decodes a EVOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.EVOptions; + + /** + * Verifies a EVOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EVOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.EVOptions; + + /** + * Creates a plain object from a EVOptions message. Also converts values to other types if specified. + * @param message EVOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.EVOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EVOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EVOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SearchTextResponse. */ + interface ISearchTextResponse { + + /** SearchTextResponse places */ + places?: (google.maps.places.v1.IPlace[]|null); + + /** SearchTextResponse contextualContents */ + contextualContents?: (google.maps.places.v1.IContextualContent[]|null); + } + + /** Represents a SearchTextResponse. */ + class SearchTextResponse implements ISearchTextResponse { + + /** + * Constructs a new SearchTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchTextResponse); + + /** SearchTextResponse places. */ + public places: google.maps.places.v1.IPlace[]; + + /** SearchTextResponse contextualContents. */ + public contextualContents: google.maps.places.v1.IContextualContent[]; + + /** + * Creates a new SearchTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchTextResponse instance + */ + public static create(properties?: google.maps.places.v1.ISearchTextResponse): google.maps.places.v1.SearchTextResponse; + + /** + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextResponse; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextResponse; + + /** + * Verifies a SearchTextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextResponse; + + /** + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @param message SearchTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPhotoMediaRequest. */ + interface IGetPhotoMediaRequest { + + /** GetPhotoMediaRequest name */ + name?: (string|null); + + /** GetPhotoMediaRequest maxWidthPx */ + maxWidthPx?: (number|null); + + /** GetPhotoMediaRequest maxHeightPx */ + maxHeightPx?: (number|null); + + /** GetPhotoMediaRequest skipHttpRedirect */ + skipHttpRedirect?: (boolean|null); + } + + /** Represents a GetPhotoMediaRequest. */ + class GetPhotoMediaRequest implements IGetPhotoMediaRequest { + + /** + * Constructs a new GetPhotoMediaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IGetPhotoMediaRequest); + + /** GetPhotoMediaRequest name. */ + public name: string; + + /** GetPhotoMediaRequest maxWidthPx. */ + public maxWidthPx: number; + + /** GetPhotoMediaRequest maxHeightPx. */ + public maxHeightPx: number; + + /** GetPhotoMediaRequest skipHttpRedirect. */ + public skipHttpRedirect: boolean; + + /** + * Creates a new GetPhotoMediaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPhotoMediaRequest instance + */ + public static create(properties?: google.maps.places.v1.IGetPhotoMediaRequest): google.maps.places.v1.GetPhotoMediaRequest; + + /** + * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @param message GetPhotoMediaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @param message GetPhotoMediaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPhotoMediaRequest; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPhotoMediaRequest; + + /** + * Verifies a GetPhotoMediaRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPhotoMediaRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPhotoMediaRequest; + + /** + * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. + * @param message GetPhotoMediaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.GetPhotoMediaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPhotoMediaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPhotoMediaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhotoMedia. */ + interface IPhotoMedia { + + /** PhotoMedia name */ + name?: (string|null); + + /** PhotoMedia photoUri */ + photoUri?: (string|null); + } + + /** Represents a PhotoMedia. */ + class PhotoMedia implements IPhotoMedia { + + /** + * Constructs a new PhotoMedia. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPhotoMedia); + + /** PhotoMedia name. */ + public name: string; + + /** PhotoMedia photoUri. */ + public photoUri: string; + + /** + * Creates a new PhotoMedia instance using the specified properties. + * @param [properties] Properties to set + * @returns PhotoMedia instance + */ + public static create(properties?: google.maps.places.v1.IPhotoMedia): google.maps.places.v1.PhotoMedia; + + /** + * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @param message PhotoMedia message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @param message PhotoMedia message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.PhotoMedia; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.PhotoMedia; + + /** + * Verifies a PhotoMedia message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhotoMedia + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.PhotoMedia; + + /** + * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. + * @param message PhotoMedia + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.PhotoMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhotoMedia to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhotoMedia + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPlaceRequest. */ + interface IGetPlaceRequest { + + /** GetPlaceRequest name */ + name?: (string|null); + + /** GetPlaceRequest languageCode */ + languageCode?: (string|null); + + /** GetPlaceRequest regionCode */ + regionCode?: (string|null); + + /** GetPlaceRequest sessionToken */ + sessionToken?: (string|null); + } + + /** Represents a GetPlaceRequest. */ + class GetPlaceRequest implements IGetPlaceRequest { + + /** + * Constructs a new GetPlaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IGetPlaceRequest); + + /** GetPlaceRequest name. */ + public name: string; + + /** GetPlaceRequest languageCode. */ + public languageCode: string; + + /** GetPlaceRequest regionCode. */ + public regionCode: string; + + /** GetPlaceRequest sessionToken. */ + public sessionToken: string; + + /** + * Creates a new GetPlaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPlaceRequest instance + */ + public static create(properties?: google.maps.places.v1.IGetPlaceRequest): google.maps.places.v1.GetPlaceRequest; + + /** + * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @param message GetPlaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @param message GetPlaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPlaceRequest; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPlaceRequest; + + /** + * Verifies a GetPlaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPlaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPlaceRequest; + + /** + * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. + * @param message GetPlaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.GetPlaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPlaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPlaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutocompletePlacesRequest. */ + interface IAutocompletePlacesRequest { + + /** AutocompletePlacesRequest input */ + input?: (string|null); + + /** AutocompletePlacesRequest locationBias */ + locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); + + /** AutocompletePlacesRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); + + /** AutocompletePlacesRequest includedPrimaryTypes */ + includedPrimaryTypes?: (string[]|null); + + /** AutocompletePlacesRequest includedRegionCodes */ + includedRegionCodes?: (string[]|null); + + /** AutocompletePlacesRequest languageCode */ + languageCode?: (string|null); + + /** AutocompletePlacesRequest regionCode */ + regionCode?: (string|null); + + /** AutocompletePlacesRequest origin */ + origin?: (google.type.ILatLng|null); + + /** AutocompletePlacesRequest inputOffset */ + inputOffset?: (number|null); + + /** AutocompletePlacesRequest includeQueryPredictions */ + includeQueryPredictions?: (boolean|null); + + /** AutocompletePlacesRequest sessionToken */ + sessionToken?: (string|null); + } + + /** Represents an AutocompletePlacesRequest. */ + class AutocompletePlacesRequest implements IAutocompletePlacesRequest { + + /** + * Constructs a new AutocompletePlacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAutocompletePlacesRequest); + + /** AutocompletePlacesRequest input. */ + public input: string; + + /** AutocompletePlacesRequest locationBias. */ + public locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); + + /** AutocompletePlacesRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); + + /** AutocompletePlacesRequest includedPrimaryTypes. */ + public includedPrimaryTypes: string[]; + + /** AutocompletePlacesRequest includedRegionCodes. */ + public includedRegionCodes: string[]; + + /** AutocompletePlacesRequest languageCode. */ + public languageCode: string; + + /** AutocompletePlacesRequest regionCode. */ + public regionCode: string; + + /** AutocompletePlacesRequest origin. */ + public origin?: (google.type.ILatLng|null); + + /** AutocompletePlacesRequest inputOffset. */ + public inputOffset: number; + + /** AutocompletePlacesRequest includeQueryPredictions. */ + public includeQueryPredictions: boolean; + + /** AutocompletePlacesRequest sessionToken. */ + public sessionToken: string; + + /** + * Creates a new AutocompletePlacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AutocompletePlacesRequest instance + */ + public static create(properties?: google.maps.places.v1.IAutocompletePlacesRequest): google.maps.places.v1.AutocompletePlacesRequest; + + /** + * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @param message AutocompletePlacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @param message AutocompletePlacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest; + + /** + * Verifies an AutocompletePlacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutocompletePlacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest; + + /** + * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. + * @param message AutocompletePlacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutocompletePlacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutocompletePlacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutocompletePlacesRequest { + + /** Properties of a LocationBias. */ + interface ILocationBias { + + /** LocationBias rectangle */ + rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle */ + circle?: (google.maps.places.v1.ICircle|null); + } + + /** Represents a LocationBias. */ + class LocationBias implements ILocationBias { + + /** + * Constructs a new LocationBias. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias); + + /** LocationBias rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationBias type. */ + public type?: ("rectangle"|"circle"); + + /** + * Creates a new LocationBias instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationBias instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + + /** + * Verifies a LocationBias message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationBias + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @param message LocationBias + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationBias to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationBias + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { + + /** LocationRestriction rectangle */ + rectangle?: (google.geo.type.IViewport|null); + + /** LocationRestriction circle */ + circle?: (google.maps.places.v1.ICircle|null); + } + + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { + + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction); + + /** LocationRestriction rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationRestriction circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationRestriction type. */ + public type?: ("rectangle"|"circle"); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + + /** + * Verifies a LocationRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AutocompletePlacesResponse. */ + interface IAutocompletePlacesResponse { + + /** AutocompletePlacesResponse suggestions */ + suggestions?: (google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]|null); + } + + /** Represents an AutocompletePlacesResponse. */ + class AutocompletePlacesResponse implements IAutocompletePlacesResponse { + + /** + * Constructs a new AutocompletePlacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAutocompletePlacesResponse); + + /** AutocompletePlacesResponse suggestions. */ + public suggestions: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]; + + /** + * Creates a new AutocompletePlacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AutocompletePlacesResponse instance + */ + public static create(properties?: google.maps.places.v1.IAutocompletePlacesResponse): google.maps.places.v1.AutocompletePlacesResponse; + + /** + * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @param message AutocompletePlacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @param message AutocompletePlacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse; + + /** + * Verifies an AutocompletePlacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutocompletePlacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse; + + /** + * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. + * @param message AutocompletePlacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutocompletePlacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutocompletePlacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AutocompletePlacesResponse { + + /** Properties of a Suggestion. */ + interface ISuggestion { + + /** Suggestion placePrediction */ + placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); + + /** Suggestion queryPrediction */ + queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); + } + + /** Represents a Suggestion. */ + class Suggestion implements ISuggestion { + + /** + * Constructs a new Suggestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion); + + /** Suggestion placePrediction. */ + public placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); + + /** Suggestion queryPrediction. */ + public queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); + + /** Suggestion kind. */ + public kind?: ("placePrediction"|"queryPrediction"); + + /** + * Creates a new Suggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns Suggestion instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Suggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Verifies a Suggestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Suggestion + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @param message Suggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Suggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Suggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Suggestion { + + /** Properties of a StringRange. */ + interface IStringRange { + + /** StringRange startOffset */ + startOffset?: (number|null); + + /** StringRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a StringRange. */ + class StringRange implements IStringRange { + + /** + * Constructs a new StringRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange); + + /** StringRange startOffset. */ + public startOffset: number; + + /** StringRange endOffset. */ + public endOffset: number; + + /** + * Creates a new StringRange instance using the specified properties. + * @param [properties] Properties to set + * @returns StringRange instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @param message StringRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @param message StringRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Decodes a StringRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Verifies a StringRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringRange + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Creates a plain object from a StringRange message. Also converts values to other types if specified. + * @param message StringRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FormattableText. */ + interface IFormattableText { + + /** FormattableText text */ + text?: (string|null); + + /** FormattableText matches */ + matches?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]|null); + } + + /** Represents a FormattableText. */ + class FormattableText implements IFormattableText { + + /** + * Constructs a new FormattableText. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText); + + /** FormattableText text. */ + public text: string; + + /** FormattableText matches. */ + public matches: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]; + + /** + * Creates a new FormattableText instance using the specified properties. + * @param [properties] Properties to set + * @returns FormattableText instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + + /** + * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @param message FormattableText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @param message FormattableText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FormattableText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + + /** + * Decodes a FormattableText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + + /** + * Verifies a FormattableText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FormattableText + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + + /** + * Creates a plain object from a FormattableText message. Also converts values to other types if specified. + * @param message FormattableText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FormattableText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FormattableText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StructuredFormat. */ + interface IStructuredFormat { + + /** StructuredFormat mainText */ + mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** StructuredFormat secondaryText */ + secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + } + + /** Represents a StructuredFormat. */ + class StructuredFormat implements IStructuredFormat { + + /** + * Constructs a new StructuredFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat); + + /** StructuredFormat mainText. */ + public mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** StructuredFormat secondaryText. */ + public secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** + * Creates a new StructuredFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StructuredFormat instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + + /** + * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @param message StructuredFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @param message StructuredFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + + /** + * Verifies a StructuredFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StructuredFormat + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + + /** + * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. + * @param message StructuredFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StructuredFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StructuredFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlacePrediction. */ + interface IPlacePrediction { + + /** PlacePrediction place */ + place?: (string|null); + + /** PlacePrediction placeId */ + placeId?: (string|null); + + /** PlacePrediction text */ + text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** PlacePrediction structuredFormat */ + structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + + /** PlacePrediction types */ + types?: (string[]|null); + + /** PlacePrediction distanceMeters */ + distanceMeters?: (number|null); + } + + /** Represents a PlacePrediction. */ + class PlacePrediction implements IPlacePrediction { + + /** + * Constructs a new PlacePrediction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction); + + /** PlacePrediction place. */ + public place: string; + + /** PlacePrediction placeId. */ + public placeId: string; + + /** PlacePrediction text. */ + public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** PlacePrediction structuredFormat. */ + public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + + /** PlacePrediction types. */ + public types: string[]; + + /** PlacePrediction distanceMeters. */ + public distanceMeters: number; + + /** + * Creates a new PlacePrediction instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacePrediction instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + + /** + * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @param message PlacePrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @param message PlacePrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacePrediction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + + /** + * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + + /** + * Verifies a PlacePrediction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacePrediction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + + /** + * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. + * @param message PlacePrediction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacePrediction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacePrediction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryPrediction. */ + interface IQueryPrediction { + + /** QueryPrediction text */ + text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** QueryPrediction structuredFormat */ + structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + } + + /** Represents a QueryPrediction. */ + class QueryPrediction implements IQueryPrediction { + + /** + * Constructs a new QueryPrediction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction); + + /** QueryPrediction text. */ + public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** QueryPrediction structuredFormat. */ + public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + + /** + * Creates a new QueryPrediction instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryPrediction instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + + /** + * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @param message QueryPrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @param message QueryPrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryPrediction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + + /** + * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + + /** + * Verifies a QueryPrediction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryPrediction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + + /** + * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. + * @param message QueryPrediction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryPrediction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryPrediction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.js b/owl-bot-staging/google-maps-places/v1/protos/protos.js new file mode 100644 index 00000000000..28e7a11cbfb --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/protos.js @@ -0,0 +1,36611 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._googlemaps_places_protos || ($protobuf.roots._googlemaps_places_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.geo = (function() { + + /** + * Namespace geo. + * @memberof google + * @namespace + */ + var geo = {}; + + geo.type = (function() { + + /** + * Namespace type. + * @memberof google.geo + * @namespace + */ + var type = {}; + + type.Viewport = (function() { + + /** + * Properties of a Viewport. + * @memberof google.geo.type + * @interface IViewport + * @property {google.type.ILatLng|null} [low] Viewport low + * @property {google.type.ILatLng|null} [high] Viewport high + */ + + /** + * Constructs a new Viewport. + * @memberof google.geo.type + * @classdesc Represents a Viewport. + * @implements IViewport + * @constructor + * @param {google.geo.type.IViewport=} [properties] Properties to set + */ + function Viewport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Viewport low. + * @member {google.type.ILatLng|null|undefined} low + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.low = null; + + /** + * Viewport high. + * @member {google.type.ILatLng|null|undefined} high + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.high = null; + + /** + * Creates a new Viewport instance using the specified properties. + * @function create + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport=} [properties] Properties to set + * @returns {google.geo.type.Viewport} Viewport instance + */ + Viewport.create = function create(properties) { + return new Viewport(properties); + }; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encode + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @function decode + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.high = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Viewport message. + * @function verify + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Viewport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) { + var error = $root.google.type.LatLng.verify(message.low); + if (error) + return "low." + error; + } + if (message.high != null && message.hasOwnProperty("high")) { + var error = $root.google.type.LatLng.verify(message.high); + if (error) + return "high." + error; + } + return null; + }; + + /** + * Creates a Viewport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} object Plain object + * @returns {google.geo.type.Viewport} Viewport + */ + Viewport.fromObject = function fromObject(object) { + if (object instanceof $root.google.geo.type.Viewport) + return object; + var message = new $root.google.geo.type.Viewport(); + if (object.low != null) { + if (typeof object.low !== "object") + throw TypeError(".google.geo.type.Viewport.low: object expected"); + message.low = $root.google.type.LatLng.fromObject(object.low); + } + if (object.high != null) { + if (typeof object.high !== "object") + throw TypeError(".google.geo.type.Viewport.high: object expected"); + message.high = $root.google.type.LatLng.fromObject(object.high); + } + return message; + }; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.Viewport} message Viewport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Viewport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = null; + object.high = null; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = $root.google.type.LatLng.toObject(message.low, options); + if (message.high != null && message.hasOwnProperty("high")) + object.high = $root.google.type.LatLng.toObject(message.high, options); + return object; + }; + + /** + * Converts this Viewport to JSON. + * @function toJSON + * @memberof google.geo.type.Viewport + * @instance + * @returns {Object.} JSON object + */ + Viewport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Viewport + * @function getTypeUrl + * @memberof google.geo.type.Viewport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.geo.type.Viewport"; + }; + + return Viewport; + })(); + + return type; + })(); + + return geo; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.LatLng = (function() { + + /** + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude + */ + + /** + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng + * @constructor + * @param {google.type.ILatLng=} [properties] Properties to set + */ + function LatLng(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.latitude = 0; + + /** + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.longitude = 0; + + /** + * Creates a new LatLng instance using the specified properties. + * @function create + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng=} [properties] Properties to set + * @returns {google.type.LatLng} LatLng instance + */ + LatLng.create = function create(properties) { + return new LatLng(properties); + }; + + /** + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @function encode + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng} message LatLng message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatLng.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude); + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude); + return writer; + }; + + /** + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng} message LatLng message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatLng.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatLng message from the specified reader or buffer. + * @function decode + * @memberof google.type.LatLng + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.LatLng} LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatLng.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.latitude = reader.double(); + break; + } + case 2: { + message.longitude = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatLng message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.LatLng + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.LatLng} LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatLng.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatLng message. + * @function verify + * @memberof google.type.LatLng + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatLng.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latitude != null && message.hasOwnProperty("latitude")) + if (typeof message.latitude !== "number") + return "latitude: number expected"; + if (message.longitude != null && message.hasOwnProperty("longitude")) + if (typeof message.longitude !== "number") + return "longitude: number expected"; + return null; + }; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.LatLng + * @static + * @param {Object.} object Plain object + * @returns {google.type.LatLng} LatLng + */ + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) + return object; + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); + return message; + }; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.LatLng + * @static + * @param {google.type.LatLng} message LatLng + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatLng.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.latitude = 0; + object.longitude = 0; + } + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; + return object; + }; + + /** + * Converts this LatLng to JSON. + * @function toJSON + * @memberof google.type.LatLng + * @instance + * @returns {Object.} JSON object + */ + LatLng.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatLng + * @function getTypeUrl + * @memberof google.type.LatLng + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LatLng"; + }; + + return LatLng; + })(); + + type.LocalizedText = (function() { + + /** + * Properties of a LocalizedText. + * @memberof google.type + * @interface ILocalizedText + * @property {string|null} [text] LocalizedText text + * @property {string|null} [languageCode] LocalizedText languageCode + */ + + /** + * Constructs a new LocalizedText. + * @memberof google.type + * @classdesc Represents a LocalizedText. + * @implements ILocalizedText + * @constructor + * @param {google.type.ILocalizedText=} [properties] Properties to set + */ + function LocalizedText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocalizedText text. + * @member {string} text + * @memberof google.type.LocalizedText + * @instance + */ + LocalizedText.prototype.text = ""; + + /** + * LocalizedText languageCode. + * @member {string} languageCode + * @memberof google.type.LocalizedText + * @instance + */ + LocalizedText.prototype.languageCode = ""; + + /** + * Creates a new LocalizedText instance using the specified properties. + * @function create + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText=} [properties] Properties to set + * @returns {google.type.LocalizedText} LocalizedText instance + */ + LocalizedText.create = function create(properties) { + return new LocalizedText(properties); + }; + + /** + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @function encode + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalizedText message from the specified reader or buffer. + * @function decode + * @memberof google.type.LocalizedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.LocalizedText} LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LocalizedText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.LocalizedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.LocalizedText} LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalizedText message. + * @function verify + * @memberof google.type.LocalizedText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalizedText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.LocalizedText + * @static + * @param {Object.} object Plain object + * @returns {google.type.LocalizedText} LocalizedText + */ + LocalizedText.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LocalizedText) + return object; + var message = new $root.google.type.LocalizedText(); + if (object.text != null) + message.text = String(object.text); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.LocalizedText + * @static + * @param {google.type.LocalizedText} message LocalizedText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalizedText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.languageCode = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this LocalizedText to JSON. + * @function toJSON + * @memberof google.type.LocalizedText + * @instance + * @returns {Object.} JSON object + */ + LocalizedText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalizedText + * @function getTypeUrl + * @memberof google.type.LocalizedText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalizedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LocalizedText"; + }; + + return LocalizedText; + })(); + + type.Money = (function() { + + /** + * Properties of a Money. + * @memberof google.type + * @interface IMoney + * @property {string|null} [currencyCode] Money currencyCode + * @property {number|Long|null} [units] Money units + * @property {number|null} [nanos] Money nanos + */ + + /** + * Constructs a new Money. + * @memberof google.type + * @classdesc Represents a Money. + * @implements IMoney + * @constructor + * @param {google.type.IMoney=} [properties] Properties to set + */ + function Money(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Money currencyCode. + * @member {string} currencyCode + * @memberof google.type.Money + * @instance + */ + Money.prototype.currencyCode = ""; + + /** + * Money units. + * @member {number|Long} units + * @memberof google.type.Money + * @instance + */ + Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Money nanos. + * @member {number} nanos + * @memberof google.type.Money + * @instance + */ + Money.prototype.nanos = 0; + + /** + * Creates a new Money instance using the specified properties. + * @function create + * @memberof google.type.Money + * @static + * @param {google.type.IMoney=} [properties] Properties to set + * @returns {google.type.Money} Money instance + */ + Money.create = function create(properties) { + return new Money(properties); + }; + + /** + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @function encode + * @memberof google.type.Money + * @static + * @param {google.type.IMoney} message Money message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Money.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); + if (message.units != null && Object.hasOwnProperty.call(message, "units")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Money + * @static + * @param {google.type.IMoney} message Money message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Money.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Money message from the specified reader or buffer. + * @function decode + * @memberof google.type.Money + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Money} Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Money.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.currencyCode = reader.string(); + break; + } + case 2: { + message.units = reader.int64(); + break; + } + case 3: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Money message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Money + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Money} Money + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Money.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Money message. + * @function verify + * @memberof google.type.Money + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Money.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.units != null && message.hasOwnProperty("units")) + if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) + return "units: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Money message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Money + * @static + * @param {Object.} object Plain object + * @returns {google.type.Money} Money + */ + Money.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Money) + return object; + var message = new $root.google.type.Money(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.units != null) + if ($util.Long) + (message.units = $util.Long.fromValue(object.units)).unsigned = false; + else if (typeof object.units === "string") + message.units = parseInt(object.units, 10); + else if (typeof object.units === "number") + message.units = object.units; + else if (typeof object.units === "object") + message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Money + * @static + * @param {google.type.Money} message Money + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Money.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.currencyCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.units = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.units != null && message.hasOwnProperty("units")) + if (typeof message.units === "number") + object.units = options.longs === String ? String(message.units) : message.units; + else + object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Money to JSON. + * @function toJSON + * @memberof google.type.Money + * @instance + * @returns {Object.} JSON object + */ + Money.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Money + * @function getTypeUrl + * @memberof google.type.Money + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Money"; + }; + + return Money; + })(); + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + google.maps = (function() { + + /** + * Namespace maps. + * @memberof google + * @namespace + */ + var maps = {}; + + maps.places = (function() { + + /** + * Namespace places. + * @memberof google.maps + * @namespace + */ + var places = {}; + + places.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.maps.places + * @namespace + */ + var v1 = {}; + + v1.AuthorAttribution = (function() { + + /** + * Properties of an AuthorAttribution. + * @memberof google.maps.places.v1 + * @interface IAuthorAttribution + * @property {string|null} [displayName] AuthorAttribution displayName + * @property {string|null} [uri] AuthorAttribution uri + * @property {string|null} [photoUri] AuthorAttribution photoUri + */ + + /** + * Constructs a new AuthorAttribution. + * @memberof google.maps.places.v1 + * @classdesc Represents an AuthorAttribution. + * @implements IAuthorAttribution + * @constructor + * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set + */ + function AuthorAttribution(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthorAttribution displayName. + * @member {string} displayName + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.displayName = ""; + + /** + * AuthorAttribution uri. + * @member {string} uri + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.uri = ""; + + /** + * AuthorAttribution photoUri. + * @member {string} photoUri + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.photoUri = ""; + + /** + * Creates a new AuthorAttribution instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution instance + */ + AuthorAttribution.create = function create(properties) { + return new AuthorAttribution(properties); + }; + + /** + * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorAttribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.photoUri); + return writer; + }; + + /** + * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorAttribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthorAttribution message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorAttribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AuthorAttribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.photoUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorAttribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthorAttribution message. + * @function verify + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorAttribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + if (!$util.isString(message.photoUri)) + return "photoUri: string expected"; + return null; + }; + + /** + * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + */ + AuthorAttribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AuthorAttribution) + return object; + var message = new $root.google.maps.places.v1.AuthorAttribution(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.photoUri != null) + message.photoUri = String(object.photoUri); + return message; + }; + + /** + * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.AuthorAttribution} message AuthorAttribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorAttribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.photoUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + object.photoUri = message.photoUri; + return object; + }; + + /** + * Converts this AuthorAttribution to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + * @returns {Object.} JSON object + */ + AuthorAttribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthorAttribution + * @function getTypeUrl + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AuthorAttribution"; + }; + + return AuthorAttribution; + })(); + + v1.ContentBlock = (function() { + + /** + * Properties of a ContentBlock. + * @memberof google.maps.places.v1 + * @interface IContentBlock + * @property {string|null} [topic] ContentBlock topic + * @property {google.type.ILocalizedText|null} [content] ContentBlock content + * @property {google.maps.places.v1.IReferences|null} [references] ContentBlock references + */ + + /** + * Constructs a new ContentBlock. + * @memberof google.maps.places.v1 + * @classdesc Represents a ContentBlock. + * @implements IContentBlock + * @constructor + * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set + */ + function ContentBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContentBlock topic. + * @member {string} topic + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.topic = ""; + + /** + * ContentBlock content. + * @member {google.type.ILocalizedText|null|undefined} content + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.content = null; + + /** + * ContentBlock references. + * @member {google.maps.places.v1.IReferences|null|undefined} references + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.references = null; + + /** + * Creates a new ContentBlock instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set + * @returns {google.maps.places.v1.ContentBlock} ContentBlock instance + */ + ContentBlock.create = function create(properties) { + return new ContentBlock(properties); + }; + + /** + * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.type.LocalizedText.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentBlock message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContentBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + case 2: { + message.content = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 3: { + message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContentBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentBlock message. + * @function verify + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.type.LocalizedText.verify(message.content); + if (error) + return "content." + error; + } + if (message.references != null && message.hasOwnProperty("references")) { + var error = $root.google.maps.places.v1.References.verify(message.references); + if (error) + return "references." + error; + } + return null; + }; + + /** + * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + */ + ContentBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContentBlock) + return object; + var message = new $root.google.maps.places.v1.ContentBlock(); + if (object.topic != null) + message.topic = String(object.topic); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.maps.places.v1.ContentBlock.content: object expected"); + message.content = $root.google.type.LocalizedText.fromObject(object.content); + } + if (object.references != null) { + if (typeof object.references !== "object") + throw TypeError(".google.maps.places.v1.ContentBlock.references: object expected"); + message.references = $root.google.maps.places.v1.References.fromObject(object.references); + } + return message; + }; + + /** + * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.ContentBlock} message ContentBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topic = ""; + object.content = null; + object.references = null; + } + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.type.LocalizedText.toObject(message.content, options); + if (message.references != null && message.hasOwnProperty("references")) + object.references = $root.google.maps.places.v1.References.toObject(message.references, options); + return object; + }; + + /** + * Converts this ContentBlock to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContentBlock + * @instance + * @returns {Object.} JSON object + */ + ContentBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentBlock + * @function getTypeUrl + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContentBlock"; + }; + + return ContentBlock; + })(); + + v1.References = (function() { + + /** + * Properties of a References. + * @memberof google.maps.places.v1 + * @interface IReferences + * @property {Array.|null} [reviews] References reviews + * @property {Array.|null} [places] References places + */ + + /** + * Constructs a new References. + * @memberof google.maps.places.v1 + * @classdesc Represents a References. + * @implements IReferences + * @constructor + * @param {google.maps.places.v1.IReferences=} [properties] Properties to set + */ + function References(properties) { + this.reviews = []; + this.places = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * References reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.References + * @instance + */ + References.prototype.reviews = $util.emptyArray; + + /** + * References places. + * @member {Array.} places + * @memberof google.maps.places.v1.References + * @instance + */ + References.prototype.places = $util.emptyArray; + + /** + * Creates a new References instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences=} [properties] Properties to set + * @returns {google.maps.places.v1.References} References instance + */ + References.create = function create(properties) { + return new References(properties); + }; + + /** + * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences} message References message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + References.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.places[i]); + return writer; + }; + + /** + * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences} message References message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + References.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a References message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.References + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.References} References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + References.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.References(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a References message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.References + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.References} References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + References.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a References message. + * @function verify + * @memberof google.maps.places.v1.References + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + References.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } + } + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) + if (!$util.isString(message.places[i])) + return "places: string[] expected"; + } + return null; + }; + + /** + * Creates a References message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.References + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.References} References + */ + References.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.References) + return object; + var message = new $root.google.maps.places.v1.References(); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.References.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.References.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.References.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) + message.places[i] = String(object.places[i]); + } + return message; + }; + + /** + * Creates a plain object from a References message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.References} message References + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + References.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reviews = []; + object.places = []; + } + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); + } + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = message.places[j]; + } + return object; + }; + + /** + * Converts this References to JSON. + * @function toJSON + * @memberof google.maps.places.v1.References + * @instance + * @returns {Object.} JSON object + */ + References.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for References + * @function getTypeUrl + * @memberof google.maps.places.v1.References + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + References.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.References"; + }; + + return References; + })(); + + v1.Review = (function() { + + /** + * Properties of a Review. + * @memberof google.maps.places.v1 + * @interface IReview + * @property {string|null} [name] Review name + * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription + * @property {google.type.ILocalizedText|null} [text] Review text + * @property {google.type.ILocalizedText|null} [originalText] Review originalText + * @property {number|null} [rating] Review rating + * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution + * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime + */ + + /** + * Constructs a new Review. + * @memberof google.maps.places.v1 + * @classdesc Represents a Review. + * @implements IReview + * @constructor + * @param {google.maps.places.v1.IReview=} [properties] Properties to set + */ + function Review(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Review name. + * @member {string} name + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.name = ""; + + /** + * Review relativePublishTimeDescription. + * @member {string} relativePublishTimeDescription + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.relativePublishTimeDescription = ""; + + /** + * Review text. + * @member {google.type.ILocalizedText|null|undefined} text + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.text = null; + + /** + * Review originalText. + * @member {google.type.ILocalizedText|null|undefined} originalText + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.originalText = null; + + /** + * Review rating. + * @member {number} rating + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.rating = 0; + + /** + * Review authorAttribution. + * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.authorAttribution = null; + + /** + * Review publishTime. + * @member {google.protobuf.ITimestamp|null|undefined} publishTime + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.publishTime = null; + + /** + * Creates a new Review instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview=} [properties] Properties to set + * @returns {google.maps.places.v1.Review} Review instance + */ + Review.create = function create(properties) { + return new Review(properties); + }; + + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText")) + $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution")) + $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) + $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Review message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.relativePublishTimeDescription = reader.string(); + break; + } + case 9: { + message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 12: { + message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 7: { + message.rating = reader.double(); + break; + } + case 13: { + message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()); + break; + } + case 14: { + message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Review message. + * @function verify + * @memberof google.maps.places.v1.Review + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Review.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + if (!$util.isString(message.relativePublishTimeDescription)) + return "relativePublishTimeDescription: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.type.LocalizedText.verify(message.text); + if (error) + return "text." + error; + } + if (message.originalText != null && message.hasOwnProperty("originalText")) { + var error = $root.google.type.LocalizedText.verify(message.originalText); + if (error) + return "originalText." + error; + } + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) { + var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution); + if (error) + return "authorAttribution." + error; + } + if (message.publishTime != null && message.hasOwnProperty("publishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.publishTime); + if (error) + return "publishTime." + error; + } + return null; + }; + + /** + * Creates a Review message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Review + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Review} Review + */ + Review.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Review) + return object; + var message = new $root.google.maps.places.v1.Review(); + if (object.name != null) + message.name = String(object.name); + if (object.relativePublishTimeDescription != null) + message.relativePublishTimeDescription = String(object.relativePublishTimeDescription); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.Review.text: object expected"); + message.text = $root.google.type.LocalizedText.fromObject(object.text); + } + if (object.originalText != null) { + if (typeof object.originalText !== "object") + throw TypeError(".google.maps.places.v1.Review.originalText: object expected"); + message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText); + } + if (object.rating != null) + message.rating = Number(object.rating); + if (object.authorAttribution != null) { + if (typeof object.authorAttribution !== "object") + throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected"); + message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution); + } + if (object.publishTime != null) { + if (typeof object.publishTime !== "object") + throw TypeError(".google.maps.places.v1.Review.publishTime: object expected"); + message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime); + } + return message; + }; + + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.Review} message Review + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Review.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.relativePublishTimeDescription = ""; + object.rating = 0; + object.text = null; + object.originalText = null; + object.authorAttribution = null; + object.publishTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + object.relativePublishTimeDescription = message.relativePublishTimeDescription; + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.type.LocalizedText.toObject(message.text, options); + if (message.originalText != null && message.hasOwnProperty("originalText")) + object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options); + if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) + object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options); + if (message.publishTime != null && message.hasOwnProperty("publishTime")) + object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options); + return object; + }; + + /** + * Converts this Review to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Review + * @instance + * @returns {Object.} JSON object + */ + Review.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Review + * @function getTypeUrl + * @memberof google.maps.places.v1.Review + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Review"; + }; + + return Review; + })(); + + v1.ContextualContent = (function() { + + /** + * Properties of a ContextualContent. + * @memberof google.maps.places.v1 + * @interface IContextualContent + * @property {Array.|null} [reviews] ContextualContent reviews + * @property {Array.|null} [photos] ContextualContent photos + * @property {Array.|null} [justifications] ContextualContent justifications + */ + + /** + * Constructs a new ContextualContent. + * @memberof google.maps.places.v1 + * @classdesc Represents a ContextualContent. + * @implements IContextualContent + * @constructor + * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set + */ + function ContextualContent(properties) { + this.reviews = []; + this.photos = []; + this.justifications = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContextualContent reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.reviews = $util.emptyArray; + + /** + * ContextualContent photos. + * @member {Array.} photos + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.photos = $util.emptyArray; + + /** + * ContextualContent justifications. + * @member {Array.} justifications + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.justifications = $util.emptyArray; + + /** + * Creates a new ContextualContent instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent} ContextualContent instance + */ + ContextualContent.create = function create(properties) { + return new ContextualContent(properties); + }; + + /** + * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextualContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.photos != null && message.photos.length) + for (var i = 0; i < message.photos.length; ++i) + $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.justifications != null && message.justifications.length) + for (var i = 0; i < message.justifications.length; ++i) + $root.google.maps.places.v1.ContextualContent.Justification.encode(message.justifications[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextualContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContextualContent message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextualContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.photos && message.photos.length)) + message.photos = []; + message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.justifications && message.justifications.length)) + message.justifications = []; + message.justifications.push($root.google.maps.places.v1.ContextualContent.Justification.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContextualContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextualContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContextualContent message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextualContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } + } + if (message.photos != null && message.hasOwnProperty("photos")) { + if (!Array.isArray(message.photos)) + return "photos: array expected"; + for (var i = 0; i < message.photos.length; ++i) { + var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); + if (error) + return "photos." + error; + } + } + if (message.justifications != null && message.hasOwnProperty("justifications")) { + if (!Array.isArray(message.justifications)) + return "justifications: array expected"; + for (var i = 0; i < message.justifications.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.verify(message.justifications[i]); + if (error) + return "justifications." + error; + } + } + return null; + }; + + /** + * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + */ + ContextualContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent) + return object; + var message = new $root.google.maps.places.v1.ContextualContent(); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.ContextualContent.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.photos) { + if (!Array.isArray(object.photos)) + throw TypeError(".google.maps.places.v1.ContextualContent.photos: array expected"); + message.photos = []; + for (var i = 0; i < object.photos.length; ++i) { + if (typeof object.photos[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.photos: object expected"); + message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); + } + } + if (object.justifications) { + if (!Array.isArray(object.justifications)) + throw TypeError(".google.maps.places.v1.ContextualContent.justifications: array expected"); + message.justifications = []; + for (var i = 0; i < object.justifications.length; ++i) { + if (typeof object.justifications[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.justifications: object expected"); + message.justifications[i] = $root.google.maps.places.v1.ContextualContent.Justification.fromObject(object.justifications[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.ContextualContent} message ContextualContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextualContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reviews = []; + object.photos = []; + object.justifications = []; + } + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); + } + if (message.photos && message.photos.length) { + object.photos = []; + for (var j = 0; j < message.photos.length; ++j) + object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); + } + if (message.justifications && message.justifications.length) { + object.justifications = []; + for (var j = 0; j < message.justifications.length; ++j) + object.justifications[j] = $root.google.maps.places.v1.ContextualContent.Justification.toObject(message.justifications[j], options); + } + return object; + }; + + /** + * Converts this ContextualContent to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent + * @instance + * @returns {Object.} JSON object + */ + ContextualContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContextualContent + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContextualContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent"; + }; + + ContextualContent.Justification = (function() { + + /** + * Properties of a Justification. + * @memberof google.maps.places.v1.ContextualContent + * @interface IJustification + * @property {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null} [reviewJustification] Justification reviewJustification + * @property {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null} [businessAvailabilityAttributesJustification] Justification businessAvailabilityAttributesJustification + */ + + /** + * Constructs a new Justification. + * @memberof google.maps.places.v1.ContextualContent + * @classdesc Represents a Justification. + * @implements IJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set + */ + function Justification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Justification reviewJustification. + * @member {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null|undefined} reviewJustification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Justification.prototype.reviewJustification = null; + + /** + * Justification businessAvailabilityAttributesJustification. + * @member {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null|undefined} businessAvailabilityAttributesJustification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Justification.prototype.businessAvailabilityAttributesJustification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Justification justification. + * @member {"reviewJustification"|"businessAvailabilityAttributesJustification"|undefined} justification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Object.defineProperty(Justification.prototype, "justification", { + get: $util.oneOfGetter($oneOfFields = ["reviewJustification", "businessAvailabilityAttributesJustification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Justification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification instance + */ + Justification.create = function create(properties) { + return new Justification(properties); + }; + + /** + * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Justification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviewJustification != null && Object.hasOwnProperty.call(message, "reviewJustification")) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.encode(message.reviewJustification, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.businessAvailabilityAttributesJustification != null && Object.hasOwnProperty.call(message, "businessAvailabilityAttributesJustification")) + $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.encode(message.businessAvailabilityAttributesJustification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Justification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Justification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Justification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.decode(reader, reader.uint32()); + break; + } + case 2: { + message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Justification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Justification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Justification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Justification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { + properties.justification = 1; + { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify(message.reviewJustification); + if (error) + return "reviewJustification." + error; + } + } + if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { + if (properties.justification === 1) + return "justification: multiple values"; + properties.justification = 1; + { + var error = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify(message.businessAvailabilityAttributesJustification); + if (error) + return "businessAvailabilityAttributesJustification." + error; + } + } + return null; + }; + + /** + * Creates a Justification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + */ + Justification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification(); + if (object.reviewJustification != null) { + if (typeof object.reviewJustification !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.reviewJustification: object expected"); + message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.fromObject(object.reviewJustification); + } + if (object.businessAvailabilityAttributesJustification != null) { + if (typeof object.businessAvailabilityAttributesJustification !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.businessAvailabilityAttributesJustification: object expected"); + message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.fromObject(object.businessAvailabilityAttributesJustification); + } + return message; + }; + + /** + * Creates a plain object from a Justification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification} message Justification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Justification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { + object.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.toObject(message.reviewJustification, options); + if (options.oneofs) + object.justification = "reviewJustification"; + } + if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { + object.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.toObject(message.businessAvailabilityAttributesJustification, options); + if (options.oneofs) + object.justification = "businessAvailabilityAttributesJustification"; + } + return object; + }; + + /** + * Converts this Justification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + * @returns {Object.} JSON object + */ + Justification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Justification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Justification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification"; + }; + + Justification.ReviewJustification = (function() { + + /** + * Properties of a ReviewJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @interface IReviewJustification + * @property {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null} [highlightedText] ReviewJustification highlightedText + * @property {google.maps.places.v1.IReview|null} [review] ReviewJustification review + */ + + /** + * Constructs a new ReviewJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @classdesc Represents a ReviewJustification. + * @implements IReviewJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set + */ + function ReviewJustification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReviewJustification highlightedText. + * @member {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null|undefined} highlightedText + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + */ + ReviewJustification.prototype.highlightedText = null; + + /** + * ReviewJustification review. + * @member {google.maps.places.v1.IReview|null|undefined} review + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + */ + ReviewJustification.prototype.review = null; + + /** + * Creates a new ReviewJustification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification instance + */ + ReviewJustification.create = function create(properties) { + return new ReviewJustification(properties); + }; + + /** + * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewJustification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.highlightedText != null && Object.hasOwnProperty.call(message, "highlightedText")) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.encode(message.highlightedText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.review != null && Object.hasOwnProperty.call(message, "review")) + $root.google.maps.places.v1.Review.encode(message.review, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewJustification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReviewJustification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewJustification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.review = $root.google.maps.places.v1.Review.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewJustification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReviewJustification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReviewJustification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify(message.highlightedText); + if (error) + return "highlightedText." + error; + } + if (message.review != null && message.hasOwnProperty("review")) { + var error = $root.google.maps.places.v1.Review.verify(message.review); + if (error) + return "review." + error; + } + return null; + }; + + /** + * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + */ + ReviewJustification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); + if (object.highlightedText != null) { + if (typeof object.highlightedText !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.highlightedText: object expected"); + message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.fromObject(object.highlightedText); + } + if (object.review != null) { + if (typeof object.review !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.review: object expected"); + message.review = $root.google.maps.places.v1.Review.fromObject(object.review); + } + return message; + }; + + /** + * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} message ReviewJustification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReviewJustification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.highlightedText = null; + object.review = null; + } + if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) + object.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.toObject(message.highlightedText, options); + if (message.review != null && message.hasOwnProperty("review")) + object.review = $root.google.maps.places.v1.Review.toObject(message.review, options); + return object; + }; + + /** + * Converts this ReviewJustification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + * @returns {Object.} JSON object + */ + ReviewJustification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReviewJustification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReviewJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification"; + }; + + ReviewJustification.HighlightedText = (function() { + + /** + * Properties of a HighlightedText. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @interface IHighlightedText + * @property {string|null} [text] HighlightedText text + * @property {Array.|null} [highlightedTextRanges] HighlightedText highlightedTextRanges + */ + + /** + * Constructs a new HighlightedText. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @classdesc Represents a HighlightedText. + * @implements IHighlightedText + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set + */ + function HighlightedText(properties) { + this.highlightedTextRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HighlightedText text. + * @member {string} text + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + */ + HighlightedText.prototype.text = ""; + + /** + * HighlightedText highlightedTextRanges. + * @member {Array.} highlightedTextRanges + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + */ + HighlightedText.prototype.highlightedTextRanges = $util.emptyArray; + + /** + * Creates a new HighlightedText instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText instance + */ + HighlightedText.create = function create(properties) { + return new HighlightedText(properties); + }; + + /** + * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.highlightedTextRanges != null && message.highlightedTextRanges.length) + for (var i = 0; i < message.highlightedTextRanges.length; ++i) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.encode(message.highlightedTextRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HighlightedText message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.highlightedTextRanges && message.highlightedTextRanges.length)) + message.highlightedTextRanges = []; + message.highlightedTextRanges.push($root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HighlightedText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HighlightedText message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HighlightedText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.highlightedTextRanges != null && message.hasOwnProperty("highlightedTextRanges")) { + if (!Array.isArray(message.highlightedTextRanges)) + return "highlightedTextRanges: array expected"; + for (var i = 0; i < message.highlightedTextRanges.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify(message.highlightedTextRanges[i]); + if (error) + return "highlightedTextRanges." + error; + } + } + return null; + }; + + /** + * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + */ + HighlightedText.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); + if (object.text != null) + message.text = String(object.text); + if (object.highlightedTextRanges) { + if (!Array.isArray(object.highlightedTextRanges)) + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: array expected"); + message.highlightedTextRanges = []; + for (var i = 0; i < object.highlightedTextRanges.length; ++i) { + if (typeof object.highlightedTextRanges[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: object expected"); + message.highlightedTextRanges[i] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.fromObject(object.highlightedTextRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} message HighlightedText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HighlightedText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.highlightedTextRanges = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.highlightedTextRanges && message.highlightedTextRanges.length) { + object.highlightedTextRanges = []; + for (var j = 0; j < message.highlightedTextRanges.length; ++j) + object.highlightedTextRanges[j] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.toObject(message.highlightedTextRanges[j], options); + } + return object; + }; + + /** + * Converts this HighlightedText to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + * @returns {Object.} JSON object + */ + HighlightedText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HighlightedText + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HighlightedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText"; + }; + + HighlightedText.HighlightedTextRange = (function() { + + /** + * Properties of a HighlightedTextRange. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @interface IHighlightedTextRange + * @property {number|null} [startIndex] HighlightedTextRange startIndex + * @property {number|null} [endIndex] HighlightedTextRange endIndex + */ + + /** + * Constructs a new HighlightedTextRange. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @classdesc Represents a HighlightedTextRange. + * @implements IHighlightedTextRange + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set + */ + function HighlightedTextRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HighlightedTextRange startIndex. + * @member {number} startIndex + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + */ + HighlightedTextRange.prototype.startIndex = 0; + + /** + * HighlightedTextRange endIndex. + * @member {number} endIndex + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + */ + HighlightedTextRange.prototype.endIndex = 0; + + /** + * Creates a new HighlightedTextRange instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange instance + */ + HighlightedTextRange.create = function create(properties) { + return new HighlightedTextRange(properties); + }; + + /** + * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedTextRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startIndex != null && Object.hasOwnProperty.call(message, "startIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startIndex); + if (message.endIndex != null && Object.hasOwnProperty.call(message, "endIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endIndex); + return writer; + }; + + /** + * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedTextRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedTextRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startIndex = reader.int32(); + break; + } + case 2: { + message.endIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedTextRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HighlightedTextRange message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HighlightedTextRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) + if (!$util.isInteger(message.startIndex)) + return "startIndex: integer expected"; + if (message.endIndex != null && message.hasOwnProperty("endIndex")) + if (!$util.isInteger(message.endIndex)) + return "endIndex: integer expected"; + return null; + }; + + /** + * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + */ + HighlightedTextRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); + if (object.startIndex != null) + message.startIndex = object.startIndex | 0; + if (object.endIndex != null) + message.endIndex = object.endIndex | 0; + return message; + }; + + /** + * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} message HighlightedTextRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HighlightedTextRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startIndex = 0; + object.endIndex = 0; + } + if (message.startIndex != null && message.hasOwnProperty("startIndex")) + object.startIndex = message.startIndex; + if (message.endIndex != null && message.hasOwnProperty("endIndex")) + object.endIndex = message.endIndex; + return object; + }; + + /** + * Converts this HighlightedTextRange to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + * @returns {Object.} JSON object + */ + HighlightedTextRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HighlightedTextRange + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HighlightedTextRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange"; + }; + + return HighlightedTextRange; + })(); + + return HighlightedText; + })(); + + return ReviewJustification; + })(); + + Justification.BusinessAvailabilityAttributesJustification = (function() { + + /** + * Properties of a BusinessAvailabilityAttributesJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @interface IBusinessAvailabilityAttributesJustification + * @property {boolean|null} [takeout] BusinessAvailabilityAttributesJustification takeout + * @property {boolean|null} [delivery] BusinessAvailabilityAttributesJustification delivery + * @property {boolean|null} [dineIn] BusinessAvailabilityAttributesJustification dineIn + */ + + /** + * Constructs a new BusinessAvailabilityAttributesJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @classdesc Represents a BusinessAvailabilityAttributesJustification. + * @implements IBusinessAvailabilityAttributesJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set + */ + function BusinessAvailabilityAttributesJustification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BusinessAvailabilityAttributesJustification takeout. + * @member {boolean} takeout + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.takeout = false; + + /** + * BusinessAvailabilityAttributesJustification delivery. + * @member {boolean} delivery + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.delivery = false; + + /** + * BusinessAvailabilityAttributesJustification dineIn. + * @member {boolean} dineIn + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.dineIn = false; + + /** + * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification instance + */ + BusinessAvailabilityAttributesJustification.create = function create(properties) { + return new BusinessAvailabilityAttributesJustification(properties); + }; + + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BusinessAvailabilityAttributesJustification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.takeout); + if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.delivery); + if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dineIn); + return writer; + }; + + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BusinessAvailabilityAttributesJustification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BusinessAvailabilityAttributesJustification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.takeout = reader.bool(); + break; + } + case 2: { + message.delivery = reader.bool(); + break; + } + case 3: { + message.dineIn = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BusinessAvailabilityAttributesJustification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BusinessAvailabilityAttributesJustification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BusinessAvailabilityAttributesJustification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.takeout != null && message.hasOwnProperty("takeout")) + if (typeof message.takeout !== "boolean") + return "takeout: boolean expected"; + if (message.delivery != null && message.hasOwnProperty("delivery")) + if (typeof message.delivery !== "boolean") + return "delivery: boolean expected"; + if (message.dineIn != null && message.hasOwnProperty("dineIn")) + if (typeof message.dineIn !== "boolean") + return "dineIn: boolean expected"; + return null; + }; + + /** + * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + */ + BusinessAvailabilityAttributesJustification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); + if (object.takeout != null) + message.takeout = Boolean(object.takeout); + if (object.delivery != null) + message.delivery = Boolean(object.delivery); + if (object.dineIn != null) + message.dineIn = Boolean(object.dineIn); + return message; + }; + + /** + * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BusinessAvailabilityAttributesJustification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.takeout = false; + object.delivery = false; + object.dineIn = false; + } + if (message.takeout != null && message.hasOwnProperty("takeout")) + object.takeout = message.takeout; + if (message.delivery != null && message.hasOwnProperty("delivery")) + object.delivery = message.delivery; + if (message.dineIn != null && message.hasOwnProperty("dineIn")) + object.dineIn = message.dineIn; + return object; + }; + + /** + * Converts this BusinessAvailabilityAttributesJustification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + * @returns {Object.} JSON object + */ + BusinessAvailabilityAttributesJustification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BusinessAvailabilityAttributesJustification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BusinessAvailabilityAttributesJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification"; + }; + + return BusinessAvailabilityAttributesJustification; + })(); + + return Justification; + })(); + + return ContextualContent; + })(); + + v1.Photo = (function() { + + /** + * Properties of a Photo. + * @memberof google.maps.places.v1 + * @interface IPhoto + * @property {string|null} [name] Photo name + * @property {number|null} [widthPx] Photo widthPx + * @property {number|null} [heightPx] Photo heightPx + * @property {Array.|null} [authorAttributions] Photo authorAttributions + */ + + /** + * Constructs a new Photo. + * @memberof google.maps.places.v1 + * @classdesc Represents a Photo. + * @implements IPhoto + * @constructor + * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set + */ + function Photo(properties) { + this.authorAttributions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Photo name. + * @member {string} name + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.name = ""; + + /** + * Photo widthPx. + * @member {number} widthPx + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.widthPx = 0; + + /** + * Photo heightPx. + * @member {number} heightPx + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.heightPx = 0; + + /** + * Photo authorAttributions. + * @member {Array.} authorAttributions + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.authorAttributions = $util.emptyArray; + + /** + * Creates a new Photo instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set + * @returns {google.maps.places.v1.Photo} Photo instance + */ + Photo.create = function create(properties) { + return new Photo(properties); + }; + + /** + * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Photo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx); + if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx); + if (message.authorAttributions != null && message.authorAttributions.length) + for (var i = 0; i < message.authorAttributions.length; ++i) + $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Photo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Photo message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Photo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Photo} Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Photo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.widthPx = reader.int32(); + break; + } + case 3: { + message.heightPx = reader.int32(); + break; + } + case 4: { + if (!(message.authorAttributions && message.authorAttributions.length)) + message.authorAttributions = []; + message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Photo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Photo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Photo} Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Photo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Photo message. + * @function verify + * @memberof google.maps.places.v1.Photo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Photo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + if (!$util.isInteger(message.widthPx)) + return "widthPx: integer expected"; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + if (!$util.isInteger(message.heightPx)) + return "heightPx: integer expected"; + if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) { + if (!Array.isArray(message.authorAttributions)) + return "authorAttributions: array expected"; + for (var i = 0; i < message.authorAttributions.length; ++i) { + var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]); + if (error) + return "authorAttributions." + error; + } + } + return null; + }; + + /** + * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Photo + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Photo} Photo + */ + Photo.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Photo) + return object; + var message = new $root.google.maps.places.v1.Photo(); + if (object.name != null) + message.name = String(object.name); + if (object.widthPx != null) + message.widthPx = object.widthPx | 0; + if (object.heightPx != null) + message.heightPx = object.heightPx | 0; + if (object.authorAttributions) { + if (!Array.isArray(object.authorAttributions)) + throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected"); + message.authorAttributions = []; + for (var i = 0; i < object.authorAttributions.length; ++i) { + if (typeof object.authorAttributions[i] !== "object") + throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected"); + message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Photo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.Photo} message Photo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Photo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.authorAttributions = []; + if (options.defaults) { + object.name = ""; + object.widthPx = 0; + object.heightPx = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + object.widthPx = message.widthPx; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + object.heightPx = message.heightPx; + if (message.authorAttributions && message.authorAttributions.length) { + object.authorAttributions = []; + for (var j = 0; j < message.authorAttributions.length; ++j) + object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options); + } + return object; + }; + + /** + * Converts this Photo to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Photo + * @instance + * @returns {Object.} JSON object + */ + Photo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Photo + * @function getTypeUrl + * @memberof google.maps.places.v1.Photo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Photo"; + }; + + return Photo; + })(); + + v1.EVChargeOptions = (function() { + + /** + * Properties of a EVChargeOptions. + * @memberof google.maps.places.v1 + * @interface IEVChargeOptions + * @property {number|null} [connectorCount] EVChargeOptions connectorCount + * @property {Array.|null} [connectorAggregation] EVChargeOptions connectorAggregation + */ + + /** + * Constructs a new EVChargeOptions. + * @memberof google.maps.places.v1 + * @classdesc Represents a EVChargeOptions. + * @implements IEVChargeOptions + * @constructor + * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set + */ + function EVChargeOptions(properties) { + this.connectorAggregation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EVChargeOptions connectorCount. + * @member {number} connectorCount + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + */ + EVChargeOptions.prototype.connectorCount = 0; + + /** + * EVChargeOptions connectorAggregation. + * @member {Array.} connectorAggregation + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + */ + EVChargeOptions.prototype.connectorAggregation = $util.emptyArray; + + /** + * Creates a new EVChargeOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions instance + */ + EVChargeOptions.create = function create(properties) { + return new EVChargeOptions(properties); + }; + + /** + * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVChargeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectorCount != null && Object.hasOwnProperty.call(message, "connectorCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectorCount); + if (message.connectorAggregation != null && message.connectorAggregation.length) + for (var i = 0; i < message.connectorAggregation.length; ++i) + $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.encode(message.connectorAggregation[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVChargeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a EVChargeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVChargeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectorCount = reader.int32(); + break; + } + case 2: { + if (!(message.connectorAggregation && message.connectorAggregation.length)) + message.connectorAggregation = []; + message.connectorAggregation.push($root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVChargeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a EVChargeOptions message. + * @function verify + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EVChargeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) + if (!$util.isInteger(message.connectorCount)) + return "connectorCount: integer expected"; + if (message.connectorAggregation != null && message.hasOwnProperty("connectorAggregation")) { + if (!Array.isArray(message.connectorAggregation)) + return "connectorAggregation: array expected"; + for (var i = 0; i < message.connectorAggregation.length; ++i) { + var error = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify(message.connectorAggregation[i]); + if (error) + return "connectorAggregation." + error; + } + } + return null; + }; + + /** + * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + */ + EVChargeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.EVChargeOptions) + return object; + var message = new $root.google.maps.places.v1.EVChargeOptions(); + if (object.connectorCount != null) + message.connectorCount = object.connectorCount | 0; + if (object.connectorAggregation) { + if (!Array.isArray(object.connectorAggregation)) + throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: array expected"); + message.connectorAggregation = []; + for (var i = 0; i < object.connectorAggregation.length; ++i) { + if (typeof object.connectorAggregation[i] !== "object") + throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: object expected"); + message.connectorAggregation[i] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.fromObject(object.connectorAggregation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.EVChargeOptions} message EVChargeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EVChargeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectorAggregation = []; + if (options.defaults) + object.connectorCount = 0; + if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) + object.connectorCount = message.connectorCount; + if (message.connectorAggregation && message.connectorAggregation.length) { + object.connectorAggregation = []; + for (var j = 0; j < message.connectorAggregation.length; ++j) + object.connectorAggregation[j] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.toObject(message.connectorAggregation[j], options); + } + return object; + }; + + /** + * Converts this EVChargeOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + * @returns {Object.} JSON object + */ + EVChargeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EVChargeOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EVChargeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions"; + }; + + EVChargeOptions.ConnectorAggregation = (function() { + + /** + * Properties of a ConnectorAggregation. + * @memberof google.maps.places.v1.EVChargeOptions + * @interface IConnectorAggregation + * @property {google.maps.places.v1.EVConnectorType|null} [type] ConnectorAggregation type + * @property {number|null} [maxChargeRateKw] ConnectorAggregation maxChargeRateKw + * @property {number|null} [count] ConnectorAggregation count + * @property {number|null} [availableCount] ConnectorAggregation availableCount + * @property {number|null} [outOfServiceCount] ConnectorAggregation outOfServiceCount + * @property {google.protobuf.ITimestamp|null} [availabilityLastUpdateTime] ConnectorAggregation availabilityLastUpdateTime + */ + + /** + * Constructs a new ConnectorAggregation. + * @memberof google.maps.places.v1.EVChargeOptions + * @classdesc Represents a ConnectorAggregation. + * @implements IConnectorAggregation + * @constructor + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set + */ + function ConnectorAggregation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectorAggregation type. + * @member {google.maps.places.v1.EVConnectorType} type + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.type = 0; + + /** + * ConnectorAggregation maxChargeRateKw. + * @member {number} maxChargeRateKw + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.maxChargeRateKw = 0; + + /** + * ConnectorAggregation count. + * @member {number} count + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.count = 0; + + /** + * ConnectorAggregation availableCount. + * @member {number|null|undefined} availableCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.availableCount = null; + + /** + * ConnectorAggregation outOfServiceCount. + * @member {number|null|undefined} outOfServiceCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.outOfServiceCount = null; + + /** + * ConnectorAggregation availabilityLastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} availabilityLastUpdateTime + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.availabilityLastUpdateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConnectorAggregation _availableCount. + * @member {"availableCount"|undefined} _availableCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + Object.defineProperty(ConnectorAggregation.prototype, "_availableCount", { + get: $util.oneOfGetter($oneOfFields = ["availableCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConnectorAggregation _outOfServiceCount. + * @member {"outOfServiceCount"|undefined} _outOfServiceCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + Object.defineProperty(ConnectorAggregation.prototype, "_outOfServiceCount", { + get: $util.oneOfGetter($oneOfFields = ["outOfServiceCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConnectorAggregation instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation instance + */ + ConnectorAggregation.create = function create(properties) { + return new ConnectorAggregation(properties); + }; + + /** + * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectorAggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.maxChargeRateKw != null && Object.hasOwnProperty.call(message, "maxChargeRateKw")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.maxChargeRateKw); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.count); + if (message.availableCount != null && Object.hasOwnProperty.call(message, "availableCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.availableCount); + if (message.outOfServiceCount != null && Object.hasOwnProperty.call(message, "outOfServiceCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.outOfServiceCount); + if (message.availabilityLastUpdateTime != null && Object.hasOwnProperty.call(message, "availabilityLastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.availabilityLastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectorAggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectorAggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.maxChargeRateKw = reader.double(); + break; + } + case 3: { + message.count = reader.int32(); + break; + } + case 4: { + message.availableCount = reader.int32(); + break; + } + case 5: { + message.outOfServiceCount = reader.int32(); + break; + } + case 6: { + message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectorAggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectorAggregation message. + * @function verify + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectorAggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) + if (typeof message.maxChargeRateKw !== "number") + return "maxChargeRateKw: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.availableCount != null && message.hasOwnProperty("availableCount")) { + properties._availableCount = 1; + if (!$util.isInteger(message.availableCount)) + return "availableCount: integer expected"; + } + if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { + properties._outOfServiceCount = 1; + if (!$util.isInteger(message.outOfServiceCount)) + return "outOfServiceCount: integer expected"; + } + if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.availabilityLastUpdateTime); + if (error) + return "availabilityLastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + */ + ConnectorAggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) + return object; + var message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "EV_CONNECTOR_TYPE_OTHER": + case 1: + message.type = 1; + break; + case "EV_CONNECTOR_TYPE_J1772": + case 2: + message.type = 2; + break; + case "EV_CONNECTOR_TYPE_TYPE_2": + case 3: + message.type = 3; + break; + case "EV_CONNECTOR_TYPE_CHADEMO": + case 4: + message.type = 4; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_1": + case 5: + message.type = 5; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_2": + case 6: + message.type = 6; + break; + case "EV_CONNECTOR_TYPE_TESLA": + case 7: + message.type = 7; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": + case 8: + message.type = 8; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": + case 9: + message.type = 9; + break; + } + if (object.maxChargeRateKw != null) + message.maxChargeRateKw = Number(object.maxChargeRateKw); + if (object.count != null) + message.count = object.count | 0; + if (object.availableCount != null) + message.availableCount = object.availableCount | 0; + if (object.outOfServiceCount != null) + message.outOfServiceCount = object.outOfServiceCount | 0; + if (object.availabilityLastUpdateTime != null) { + if (typeof object.availabilityLastUpdateTime !== "object") + throw TypeError(".google.maps.places.v1.EVChargeOptions.ConnectorAggregation.availabilityLastUpdateTime: object expected"); + message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.availabilityLastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} message ConnectorAggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectorAggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "EV_CONNECTOR_TYPE_UNSPECIFIED" : 0; + object.maxChargeRateKw = 0; + object.count = 0; + object.availabilityLastUpdateTime = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.type] === undefined ? message.type : $root.google.maps.places.v1.EVConnectorType[message.type] : message.type; + if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) + object.maxChargeRateKw = options.json && !isFinite(message.maxChargeRateKw) ? String(message.maxChargeRateKw) : message.maxChargeRateKw; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.availableCount != null && message.hasOwnProperty("availableCount")) { + object.availableCount = message.availableCount; + if (options.oneofs) + object._availableCount = "availableCount"; + } + if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { + object.outOfServiceCount = message.outOfServiceCount; + if (options.oneofs) + object._outOfServiceCount = "outOfServiceCount"; + } + if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) + object.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.availabilityLastUpdateTime, options); + return object; + }; + + /** + * Converts this ConnectorAggregation to JSON. + * @function toJSON + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + * @returns {Object.} JSON object + */ + ConnectorAggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectorAggregation + * @function getTypeUrl + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectorAggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions.ConnectorAggregation"; + }; + + return ConnectorAggregation; + })(); + + return EVChargeOptions; + })(); + + /** + * EVConnectorType enum. + * @name google.maps.places.v1.EVConnectorType + * @enum {number} + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED=0 EV_CONNECTOR_TYPE_UNSPECIFIED value + * @property {number} EV_CONNECTOR_TYPE_OTHER=1 EV_CONNECTOR_TYPE_OTHER value + * @property {number} EV_CONNECTOR_TYPE_J1772=2 EV_CONNECTOR_TYPE_J1772 value + * @property {number} EV_CONNECTOR_TYPE_TYPE_2=3 EV_CONNECTOR_TYPE_TYPE_2 value + * @property {number} EV_CONNECTOR_TYPE_CHADEMO=4 EV_CONNECTOR_TYPE_CHADEMO value + * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_1=5 EV_CONNECTOR_TYPE_CCS_COMBO_1 value + * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_2=6 EV_CONNECTOR_TYPE_CCS_COMBO_2 value + * @property {number} EV_CONNECTOR_TYPE_TESLA=7 EV_CONNECTOR_TYPE_TESLA value + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T=8 EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T value + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET=9 EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET value + */ + v1.EVConnectorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EV_CONNECTOR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EV_CONNECTOR_TYPE_OTHER"] = 1; + values[valuesById[2] = "EV_CONNECTOR_TYPE_J1772"] = 2; + values[valuesById[3] = "EV_CONNECTOR_TYPE_TYPE_2"] = 3; + values[valuesById[4] = "EV_CONNECTOR_TYPE_CHADEMO"] = 4; + values[valuesById[5] = "EV_CONNECTOR_TYPE_CCS_COMBO_1"] = 5; + values[valuesById[6] = "EV_CONNECTOR_TYPE_CCS_COMBO_2"] = 6; + values[valuesById[7] = "EV_CONNECTOR_TYPE_TESLA"] = 7; + values[valuesById[8] = "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T"] = 8; + values[valuesById[9] = "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET"] = 9; + return values; + })(); + + v1.FuelOptions = (function() { + + /** + * Properties of a FuelOptions. + * @memberof google.maps.places.v1 + * @interface IFuelOptions + * @property {Array.|null} [fuelPrices] FuelOptions fuelPrices + */ + + /** + * Constructs a new FuelOptions. + * @memberof google.maps.places.v1 + * @classdesc Represents a FuelOptions. + * @implements IFuelOptions + * @constructor + * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set + */ + function FuelOptions(properties) { + this.fuelPrices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FuelOptions fuelPrices. + * @member {Array.} fuelPrices + * @memberof google.maps.places.v1.FuelOptions + * @instance + */ + FuelOptions.prototype.fuelPrices = $util.emptyArray; + + /** + * Creates a new FuelOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.FuelOptions} FuelOptions instance + */ + FuelOptions.create = function create(properties) { + return new FuelOptions(properties); + }; + + /** + * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fuelPrices != null && message.fuelPrices.length) + for (var i = 0; i < message.fuelPrices.length; ++i) + $root.google.maps.places.v1.FuelOptions.FuelPrice.encode(message.fuelPrices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FuelOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.fuelPrices && message.fuelPrices.length)) + message.fuelPrices = []; + message.fuelPrices.push($root.google.maps.places.v1.FuelOptions.FuelPrice.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FuelOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FuelOptions message. + * @function verify + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FuelOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fuelPrices != null && message.hasOwnProperty("fuelPrices")) { + if (!Array.isArray(message.fuelPrices)) + return "fuelPrices: array expected"; + for (var i = 0; i < message.fuelPrices.length; ++i) { + var error = $root.google.maps.places.v1.FuelOptions.FuelPrice.verify(message.fuelPrices[i]); + if (error) + return "fuelPrices." + error; + } + } + return null; + }; + + /** + * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + */ + FuelOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.FuelOptions) + return object; + var message = new $root.google.maps.places.v1.FuelOptions(); + if (object.fuelPrices) { + if (!Array.isArray(object.fuelPrices)) + throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: array expected"); + message.fuelPrices = []; + for (var i = 0; i < object.fuelPrices.length; ++i) { + if (typeof object.fuelPrices[i] !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: object expected"); + message.fuelPrices[i] = $root.google.maps.places.v1.FuelOptions.FuelPrice.fromObject(object.fuelPrices[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.FuelOptions} message FuelOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FuelOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fuelPrices = []; + if (message.fuelPrices && message.fuelPrices.length) { + object.fuelPrices = []; + for (var j = 0; j < message.fuelPrices.length; ++j) + object.fuelPrices[j] = $root.google.maps.places.v1.FuelOptions.FuelPrice.toObject(message.fuelPrices[j], options); + } + return object; + }; + + /** + * Converts this FuelOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.FuelOptions + * @instance + * @returns {Object.} JSON object + */ + FuelOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FuelOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FuelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.FuelOptions"; + }; + + FuelOptions.FuelPrice = (function() { + + /** + * Properties of a FuelPrice. + * @memberof google.maps.places.v1.FuelOptions + * @interface IFuelPrice + * @property {google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null} [type] FuelPrice type + * @property {google.type.IMoney|null} [price] FuelPrice price + * @property {google.protobuf.ITimestamp|null} [updateTime] FuelPrice updateTime + */ + + /** + * Constructs a new FuelPrice. + * @memberof google.maps.places.v1.FuelOptions + * @classdesc Represents a FuelPrice. + * @implements IFuelPrice + * @constructor + * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set + */ + function FuelPrice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FuelPrice type. + * @member {google.maps.places.v1.FuelOptions.FuelPrice.FuelType} type + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.type = 0; + + /** + * FuelPrice price. + * @member {google.type.IMoney|null|undefined} price + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.price = null; + + /** + * FuelPrice updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.updateTime = null; + + /** + * Creates a new FuelPrice instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice instance + */ + FuelPrice.create = function create(properties) { + return new FuelPrice(properties); + }; + + /** + * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelPrice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + $root.google.type.Money.encode(message.price, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelPrice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FuelPrice message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelPrice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.price = $root.google.type.Money.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelPrice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FuelPrice message. + * @function verify + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FuelPrice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.price != null && message.hasOwnProperty("price")) { + var error = $root.google.type.Money.verify(message.price); + if (error) + return "price." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + */ + FuelPrice.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.FuelOptions.FuelPrice) + return object; + var message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FUEL_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DIESEL": + case 1: + message.type = 1; + break; + case "REGULAR_UNLEADED": + case 2: + message.type = 2; + break; + case "MIDGRADE": + case 3: + message.type = 3; + break; + case "PREMIUM": + case 4: + message.type = 4; + break; + case "SP91": + case 5: + message.type = 5; + break; + case "SP91_E10": + case 6: + message.type = 6; + break; + case "SP92": + case 7: + message.type = 7; + break; + case "SP95": + case 8: + message.type = 8; + break; + case "SP95_E10": + case 9: + message.type = 9; + break; + case "SP98": + case 10: + message.type = 10; + break; + case "SP99": + case 11: + message.type = 11; + break; + case "SP100": + case 12: + message.type = 12; + break; + case "LPG": + case 13: + message.type = 13; + break; + case "E80": + case 14: + message.type = 14; + break; + case "E85": + case 15: + message.type = 15; + break; + case "METHANE": + case 16: + message.type = 16; + break; + case "BIO_DIESEL": + case 17: + message.type = 17; + break; + case "TRUCK_DIESEL": + case 18: + message.type = 18; + break; + } + if (object.price != null) { + if (typeof object.price !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.price: object expected"); + message.price = $root.google.type.Money.fromObject(object.price); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.FuelPrice} message FuelPrice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FuelPrice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "FUEL_TYPE_UNSPECIFIED" : 0; + object.price = null; + object.updateTime = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] === undefined ? message.type : $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] : message.type; + if (message.price != null && message.hasOwnProperty("price")) + object.price = $root.google.type.Money.toObject(message.price, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this FuelPrice to JSON. + * @function toJSON + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + * @returns {Object.} JSON object + */ + FuelPrice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FuelPrice + * @function getTypeUrl + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FuelPrice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.FuelOptions.FuelPrice"; + }; + + /** + * FuelType enum. + * @name google.maps.places.v1.FuelOptions.FuelPrice.FuelType + * @enum {number} + * @property {number} FUEL_TYPE_UNSPECIFIED=0 FUEL_TYPE_UNSPECIFIED value + * @property {number} DIESEL=1 DIESEL value + * @property {number} REGULAR_UNLEADED=2 REGULAR_UNLEADED value + * @property {number} MIDGRADE=3 MIDGRADE value + * @property {number} PREMIUM=4 PREMIUM value + * @property {number} SP91=5 SP91 value + * @property {number} SP91_E10=6 SP91_E10 value + * @property {number} SP92=7 SP92 value + * @property {number} SP95=8 SP95 value + * @property {number} SP95_E10=9 SP95_E10 value + * @property {number} SP98=10 SP98 value + * @property {number} SP99=11 SP99 value + * @property {number} SP100=12 SP100 value + * @property {number} LPG=13 LPG value + * @property {number} E80=14 E80 value + * @property {number} E85=15 E85 value + * @property {number} METHANE=16 METHANE value + * @property {number} BIO_DIESEL=17 BIO_DIESEL value + * @property {number} TRUCK_DIESEL=18 TRUCK_DIESEL value + */ + FuelPrice.FuelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIESEL"] = 1; + values[valuesById[2] = "REGULAR_UNLEADED"] = 2; + values[valuesById[3] = "MIDGRADE"] = 3; + values[valuesById[4] = "PREMIUM"] = 4; + values[valuesById[5] = "SP91"] = 5; + values[valuesById[6] = "SP91_E10"] = 6; + values[valuesById[7] = "SP92"] = 7; + values[valuesById[8] = "SP95"] = 8; + values[valuesById[9] = "SP95_E10"] = 9; + values[valuesById[10] = "SP98"] = 10; + values[valuesById[11] = "SP99"] = 11; + values[valuesById[12] = "SP100"] = 12; + values[valuesById[13] = "LPG"] = 13; + values[valuesById[14] = "E80"] = 14; + values[valuesById[15] = "E85"] = 15; + values[valuesById[16] = "METHANE"] = 16; + values[valuesById[17] = "BIO_DIESEL"] = 17; + values[valuesById[18] = "TRUCK_DIESEL"] = 18; + return values; + })(); + + return FuelPrice; + })(); + + return FuelOptions; + })(); + + v1.Circle = (function() { + + /** + * Properties of a Circle. + * @memberof google.maps.places.v1 + * @interface ICircle + * @property {google.type.ILatLng|null} [center] Circle center + * @property {number|null} [radius] Circle radius + */ + + /** + * Constructs a new Circle. + * @memberof google.maps.places.v1 + * @classdesc Represents a Circle. + * @implements ICircle + * @constructor + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + */ + function Circle(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Circle center. + * @member {google.type.ILatLng|null|undefined} center + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.center = null; + + /** + * Circle radius. + * @member {number} radius + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.radius = 0; + + /** + * Creates a new Circle instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + * @returns {google.maps.places.v1.Circle} Circle instance + */ + Circle.create = function create(properties) { + return new Circle(properties); + }; + + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.center != null && Object.hasOwnProperty.call(message, "center")) + $root.google.type.LatLng.encode(message.center, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.radius != null && Object.hasOwnProperty.call(message, "radius")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.radius); + return writer; + }; + + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Circle message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Circle(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.center = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.radius = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Circle message. + * @function verify + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Circle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.center != null && message.hasOwnProperty("center")) { + var error = $root.google.type.LatLng.verify(message.center); + if (error) + return "center." + error; + } + if (message.radius != null && message.hasOwnProperty("radius")) + if (typeof message.radius !== "number") + return "radius: number expected"; + return null; + }; + + /** + * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Circle} Circle + */ + Circle.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Circle) + return object; + var message = new $root.google.maps.places.v1.Circle(); + if (object.center != null) { + if (typeof object.center !== "object") + throw TypeError(".google.maps.places.v1.Circle.center: object expected"); + message.center = $root.google.type.LatLng.fromObject(object.center); + } + if (object.radius != null) + message.radius = Number(object.radius); + return message; + }; + + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.Circle} message Circle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Circle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.center = null; + object.radius = 0; + } + if (message.center != null && message.hasOwnProperty("center")) + object.center = $root.google.type.LatLng.toObject(message.center, options); + if (message.radius != null && message.hasOwnProperty("radius")) + object.radius = options.json && !isFinite(message.radius) ? String(message.radius) : message.radius; + return object; + }; + + /** + * Converts this Circle to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Circle + * @instance + * @returns {Object.} JSON object + */ + Circle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Circle + * @function getTypeUrl + * @memberof google.maps.places.v1.Circle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Circle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Circle"; + }; + + return Circle; + })(); + + v1.Place = (function() { + + /** + * Properties of a Place. + * @memberof google.maps.places.v1 + * @interface IPlace + * @property {string|null} [name] Place name + * @property {string|null} [id] Place id + * @property {google.type.ILocalizedText|null} [displayName] Place displayName + * @property {Array.|null} [types] Place types + * @property {string|null} [primaryType] Place primaryType + * @property {google.type.ILocalizedText|null} [primaryTypeDisplayName] Place primaryTypeDisplayName + * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber + * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber + * @property {string|null} [formattedAddress] Place formattedAddress + * @property {string|null} [shortFormattedAddress] Place shortFormattedAddress + * @property {Array.|null} [addressComponents] Place addressComponents + * @property {google.maps.places.v1.Place.IPlusCode|null} [plusCode] Place plusCode + * @property {google.type.ILatLng|null} [location] Place location + * @property {google.geo.type.IViewport|null} [viewport] Place viewport + * @property {number|null} [rating] Place rating + * @property {string|null} [googleMapsUri] Place googleMapsUri + * @property {string|null} [websiteUri] Place websiteUri + * @property {Array.|null} [reviews] Place reviews + * @property {google.maps.places.v1.Place.IOpeningHours|null} [regularOpeningHours] Place regularOpeningHours + * @property {number|null} [utcOffsetMinutes] Place utcOffsetMinutes + * @property {Array.|null} [photos] Place photos + * @property {string|null} [adrFormatAddress] Place adrFormatAddress + * @property {google.maps.places.v1.Place.BusinessStatus|null} [businessStatus] Place businessStatus + * @property {google.maps.places.v1.PriceLevel|null} [priceLevel] Place priceLevel + * @property {Array.|null} [attributions] Place attributions + * @property {number|null} [userRatingCount] Place userRatingCount + * @property {string|null} [iconMaskBaseUri] Place iconMaskBaseUri + * @property {string|null} [iconBackgroundColor] Place iconBackgroundColor + * @property {boolean|null} [takeout] Place takeout + * @property {boolean|null} [delivery] Place delivery + * @property {boolean|null} [dineIn] Place dineIn + * @property {boolean|null} [curbsidePickup] Place curbsidePickup + * @property {boolean|null} [reservable] Place reservable + * @property {boolean|null} [servesBreakfast] Place servesBreakfast + * @property {boolean|null} [servesLunch] Place servesLunch + * @property {boolean|null} [servesDinner] Place servesDinner + * @property {boolean|null} [servesBeer] Place servesBeer + * @property {boolean|null} [servesWine] Place servesWine + * @property {boolean|null} [servesBrunch] Place servesBrunch + * @property {boolean|null} [servesVegetarianFood] Place servesVegetarianFood + * @property {google.maps.places.v1.Place.IOpeningHours|null} [currentOpeningHours] Place currentOpeningHours + * @property {Array.|null} [currentSecondaryOpeningHours] Place currentSecondaryOpeningHours + * @property {Array.|null} [regularSecondaryOpeningHours] Place regularSecondaryOpeningHours + * @property {google.type.ILocalizedText|null} [editorialSummary] Place editorialSummary + * @property {boolean|null} [outdoorSeating] Place outdoorSeating + * @property {boolean|null} [liveMusic] Place liveMusic + * @property {boolean|null} [menuForChildren] Place menuForChildren + * @property {boolean|null} [servesCocktails] Place servesCocktails + * @property {boolean|null} [servesDessert] Place servesDessert + * @property {boolean|null} [servesCoffee] Place servesCoffee + * @property {boolean|null} [goodForChildren] Place goodForChildren + * @property {boolean|null} [allowsDogs] Place allowsDogs + * @property {boolean|null} [restroom] Place restroom + * @property {boolean|null} [goodForGroups] Place goodForGroups + * @property {boolean|null} [goodForWatchingSports] Place goodForWatchingSports + * @property {google.maps.places.v1.Place.IPaymentOptions|null} [paymentOptions] Place paymentOptions + * @property {google.maps.places.v1.Place.IParkingOptions|null} [parkingOptions] Place parkingOptions + * @property {Array.|null} [subDestinations] Place subDestinations + * @property {google.maps.places.v1.Place.IAccessibilityOptions|null} [accessibilityOptions] Place accessibilityOptions + * @property {google.maps.places.v1.IFuelOptions|null} [fuelOptions] Place fuelOptions + * @property {google.maps.places.v1.IEVChargeOptions|null} [evChargeOptions] Place evChargeOptions + * @property {google.maps.places.v1.Place.IGenerativeSummary|null} [generativeSummary] Place generativeSummary + * @property {google.maps.places.v1.Place.IAreaSummary|null} [areaSummary] Place areaSummary + */ + + /** + * Constructs a new Place. + * @memberof google.maps.places.v1 + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + */ + function Place(properties) { + this.types = []; + this.addressComponents = []; + this.reviews = []; + this.photos = []; + this.attributions = []; + this.currentSecondaryOpeningHours = []; + this.regularSecondaryOpeningHours = []; + this.subDestinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Place name. + * @member {string} name + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.name = ""; + + /** + * Place id. + * @member {string} id + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.id = ""; + + /** + * Place displayName. + * @member {google.type.ILocalizedText|null|undefined} displayName + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.displayName = null; + + /** + * Place types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.types = $util.emptyArray; + + /** + * Place primaryType. + * @member {string} primaryType + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.primaryType = ""; + + /** + * Place primaryTypeDisplayName. + * @member {google.type.ILocalizedText|null|undefined} primaryTypeDisplayName + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.primaryTypeDisplayName = null; + + /** + * Place nationalPhoneNumber. + * @member {string} nationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.nationalPhoneNumber = ""; + + /** + * Place internationalPhoneNumber. + * @member {string} internationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.internationalPhoneNumber = ""; + + /** + * Place formattedAddress. + * @member {string} formattedAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.formattedAddress = ""; + + /** + * Place shortFormattedAddress. + * @member {string} shortFormattedAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.shortFormattedAddress = ""; + + /** + * Place addressComponents. + * @member {Array.} addressComponents + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.addressComponents = $util.emptyArray; + + /** + * Place plusCode. + * @member {google.maps.places.v1.Place.IPlusCode|null|undefined} plusCode + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.plusCode = null; + + /** + * Place location. + * @member {google.type.ILatLng|null|undefined} location + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.location = null; + + /** + * Place viewport. + * @member {google.geo.type.IViewport|null|undefined} viewport + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.viewport = null; + + /** + * Place rating. + * @member {number} rating + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.rating = 0; + + /** + * Place googleMapsUri. + * @member {string} googleMapsUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.googleMapsUri = ""; + + /** + * Place websiteUri. + * @member {string} websiteUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.websiteUri = ""; + + /** + * Place reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reviews = $util.emptyArray; + + /** + * Place regularOpeningHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} regularOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.regularOpeningHours = null; + + /** + * Place utcOffsetMinutes. + * @member {number|null|undefined} utcOffsetMinutes + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.utcOffsetMinutes = null; + + /** + * Place photos. + * @member {Array.} photos + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.photos = $util.emptyArray; + + /** + * Place adrFormatAddress. + * @member {string} adrFormatAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.adrFormatAddress = ""; + + /** + * Place businessStatus. + * @member {google.maps.places.v1.Place.BusinessStatus} businessStatus + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.businessStatus = 0; + + /** + * Place priceLevel. + * @member {google.maps.places.v1.PriceLevel} priceLevel + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.priceLevel = 0; + + /** + * Place attributions. + * @member {Array.} attributions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.attributions = $util.emptyArray; + + /** + * Place userRatingCount. + * @member {number|null|undefined} userRatingCount + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.userRatingCount = null; + + /** + * Place iconMaskBaseUri. + * @member {string} iconMaskBaseUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconMaskBaseUri = ""; + + /** + * Place iconBackgroundColor. + * @member {string} iconBackgroundColor + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconBackgroundColor = ""; + + /** + * Place takeout. + * @member {boolean|null|undefined} takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.takeout = null; + + /** + * Place delivery. + * @member {boolean|null|undefined} delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.delivery = null; + + /** + * Place dineIn. + * @member {boolean|null|undefined} dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.dineIn = null; + + /** + * Place curbsidePickup. + * @member {boolean|null|undefined} curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.curbsidePickup = null; + + /** + * Place reservable. + * @member {boolean|null|undefined} reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reservable = null; + + /** + * Place servesBreakfast. + * @member {boolean|null|undefined} servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBreakfast = null; + + /** + * Place servesLunch. + * @member {boolean|null|undefined} servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesLunch = null; + + /** + * Place servesDinner. + * @member {boolean|null|undefined} servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesDinner = null; + + /** + * Place servesBeer. + * @member {boolean|null|undefined} servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBeer = null; + + /** + * Place servesWine. + * @member {boolean|null|undefined} servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesWine = null; + + /** + * Place servesBrunch. + * @member {boolean|null|undefined} servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBrunch = null; + + /** + * Place servesVegetarianFood. + * @member {boolean|null|undefined} servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesVegetarianFood = null; + + /** + * Place currentOpeningHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} currentOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentOpeningHours = null; + + /** + * Place currentSecondaryOpeningHours. + * @member {Array.} currentSecondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentSecondaryOpeningHours = $util.emptyArray; + + /** + * Place regularSecondaryOpeningHours. + * @member {Array.} regularSecondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.regularSecondaryOpeningHours = $util.emptyArray; + + /** + * Place editorialSummary. + * @member {google.type.ILocalizedText|null|undefined} editorialSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.editorialSummary = null; + + /** + * Place outdoorSeating. + * @member {boolean|null|undefined} outdoorSeating + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.outdoorSeating = null; + + /** + * Place liveMusic. + * @member {boolean|null|undefined} liveMusic + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.liveMusic = null; + + /** + * Place menuForChildren. + * @member {boolean|null|undefined} menuForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.menuForChildren = null; + + /** + * Place servesCocktails. + * @member {boolean|null|undefined} servesCocktails + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesCocktails = null; + + /** + * Place servesDessert. + * @member {boolean|null|undefined} servesDessert + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesDessert = null; + + /** + * Place servesCoffee. + * @member {boolean|null|undefined} servesCoffee + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesCoffee = null; + + /** + * Place goodForChildren. + * @member {boolean|null|undefined} goodForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForChildren = null; + + /** + * Place allowsDogs. + * @member {boolean|null|undefined} allowsDogs + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.allowsDogs = null; + + /** + * Place restroom. + * @member {boolean|null|undefined} restroom + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.restroom = null; + + /** + * Place goodForGroups. + * @member {boolean|null|undefined} goodForGroups + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForGroups = null; + + /** + * Place goodForWatchingSports. + * @member {boolean|null|undefined} goodForWatchingSports + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForWatchingSports = null; + + /** + * Place paymentOptions. + * @member {google.maps.places.v1.Place.IPaymentOptions|null|undefined} paymentOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.paymentOptions = null; + + /** + * Place parkingOptions. + * @member {google.maps.places.v1.Place.IParkingOptions|null|undefined} parkingOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.parkingOptions = null; + + /** + * Place subDestinations. + * @member {Array.} subDestinations + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.subDestinations = $util.emptyArray; + + /** + * Place accessibilityOptions. + * @member {google.maps.places.v1.Place.IAccessibilityOptions|null|undefined} accessibilityOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.accessibilityOptions = null; + + /** + * Place fuelOptions. + * @member {google.maps.places.v1.IFuelOptions|null|undefined} fuelOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.fuelOptions = null; + + /** + * Place evChargeOptions. + * @member {google.maps.places.v1.IEVChargeOptions|null|undefined} evChargeOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.evChargeOptions = null; + + /** + * Place generativeSummary. + * @member {google.maps.places.v1.Place.IGenerativeSummary|null|undefined} generativeSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.generativeSummary = null; + + /** + * Place areaSummary. + * @member {google.maps.places.v1.Place.IAreaSummary|null|undefined} areaSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.areaSummary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Place _utcOffsetMinutes. + * @member {"utcOffsetMinutes"|undefined} _utcOffsetMinutes + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_utcOffsetMinutes", { + get: $util.oneOfGetter($oneOfFields = ["utcOffsetMinutes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _userRatingCount. + * @member {"userRatingCount"|undefined} _userRatingCount + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_userRatingCount", { + get: $util.oneOfGetter($oneOfFields = ["userRatingCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _takeout. + * @member {"takeout"|undefined} _takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_takeout", { + get: $util.oneOfGetter($oneOfFields = ["takeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _delivery. + * @member {"delivery"|undefined} _delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_delivery", { + get: $util.oneOfGetter($oneOfFields = ["delivery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _dineIn. + * @member {"dineIn"|undefined} _dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_dineIn", { + get: $util.oneOfGetter($oneOfFields = ["dineIn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _curbsidePickup. + * @member {"curbsidePickup"|undefined} _curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_curbsidePickup", { + get: $util.oneOfGetter($oneOfFields = ["curbsidePickup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _reservable. + * @member {"reservable"|undefined} _reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_reservable", { + get: $util.oneOfGetter($oneOfFields = ["reservable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBreakfast. + * @member {"servesBreakfast"|undefined} _servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBreakfast", { + get: $util.oneOfGetter($oneOfFields = ["servesBreakfast"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesLunch. + * @member {"servesLunch"|undefined} _servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesLunch", { + get: $util.oneOfGetter($oneOfFields = ["servesLunch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesDinner. + * @member {"servesDinner"|undefined} _servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesDinner", { + get: $util.oneOfGetter($oneOfFields = ["servesDinner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBeer. + * @member {"servesBeer"|undefined} _servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBeer", { + get: $util.oneOfGetter($oneOfFields = ["servesBeer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesWine. + * @member {"servesWine"|undefined} _servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesWine", { + get: $util.oneOfGetter($oneOfFields = ["servesWine"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBrunch. + * @member {"servesBrunch"|undefined} _servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBrunch", { + get: $util.oneOfGetter($oneOfFields = ["servesBrunch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesVegetarianFood. + * @member {"servesVegetarianFood"|undefined} _servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesVegetarianFood", { + get: $util.oneOfGetter($oneOfFields = ["servesVegetarianFood"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _outdoorSeating. + * @member {"outdoorSeating"|undefined} _outdoorSeating + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_outdoorSeating", { + get: $util.oneOfGetter($oneOfFields = ["outdoorSeating"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _liveMusic. + * @member {"liveMusic"|undefined} _liveMusic + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_liveMusic", { + get: $util.oneOfGetter($oneOfFields = ["liveMusic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _menuForChildren. + * @member {"menuForChildren"|undefined} _menuForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_menuForChildren", { + get: $util.oneOfGetter($oneOfFields = ["menuForChildren"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesCocktails. + * @member {"servesCocktails"|undefined} _servesCocktails + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesCocktails", { + get: $util.oneOfGetter($oneOfFields = ["servesCocktails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesDessert. + * @member {"servesDessert"|undefined} _servesDessert + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesDessert", { + get: $util.oneOfGetter($oneOfFields = ["servesDessert"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesCoffee. + * @member {"servesCoffee"|undefined} _servesCoffee + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesCoffee", { + get: $util.oneOfGetter($oneOfFields = ["servesCoffee"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _goodForChildren. + * @member {"goodForChildren"|undefined} _goodForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForChildren", { + get: $util.oneOfGetter($oneOfFields = ["goodForChildren"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _allowsDogs. + * @member {"allowsDogs"|undefined} _allowsDogs + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_allowsDogs", { + get: $util.oneOfGetter($oneOfFields = ["allowsDogs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _restroom. + * @member {"restroom"|undefined} _restroom + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_restroom", { + get: $util.oneOfGetter($oneOfFields = ["restroom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _goodForGroups. + * @member {"goodForGroups"|undefined} _goodForGroups + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForGroups", { + get: $util.oneOfGetter($oneOfFields = ["goodForGroups"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _goodForWatchingSports. + * @member {"goodForWatchingSports"|undefined} _goodForWatchingSports + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForWatchingSports", { + get: $util.oneOfGetter($oneOfFields = ["goodForWatchingSports"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _accessibilityOptions. + * @member {"accessibilityOptions"|undefined} _accessibilityOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_accessibilityOptions", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + * @returns {google.maps.places.v1.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); + if (message.nationalPhoneNumber != null && Object.hasOwnProperty.call(message, "nationalPhoneNumber")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.nationalPhoneNumber); + if (message.internationalPhoneNumber != null && Object.hasOwnProperty.call(message, "internationalPhoneNumber")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.internationalPhoneNumber); + if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.formattedAddress); + if (message.addressComponents != null && message.addressComponents.length) + for (var i = 0; i < message.addressComponents.length; ++i) + $root.google.maps.places.v1.Place.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode")) + $root.google.maps.places.v1.Place.PlusCode.encode(message.plusCode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.viewport != null && Object.hasOwnProperty.call(message, "viewport")) + $root.google.geo.type.Viewport.encode(message.viewport, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 14, wireType 1 =*/113).double(message.rating); + if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.googleMapsUri); + if (message.websiteUri != null && Object.hasOwnProperty.call(message, "websiteUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.websiteUri); + if (message.regularOpeningHours != null && Object.hasOwnProperty.call(message, "regularOpeningHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularOpeningHours, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.utcOffsetMinutes != null && Object.hasOwnProperty.call(message, "utcOffsetMinutes")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.utcOffsetMinutes); + if (message.adrFormatAddress != null && Object.hasOwnProperty.call(message, "adrFormatAddress")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.adrFormatAddress); + if (message.businessStatus != null && Object.hasOwnProperty.call(message, "businessStatus")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.businessStatus); + if (message.priceLevel != null && Object.hasOwnProperty.call(message, "priceLevel")) + writer.uint32(/* id 26, wireType 0 =*/208).int32(message.priceLevel); + if (message.attributions != null && message.attributions.length) + for (var i = 0; i < message.attributions.length; ++i) + $root.google.maps.places.v1.Place.Attribution.encode(message.attributions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.userRatingCount != null && Object.hasOwnProperty.call(message, "userRatingCount")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.userRatingCount); + if (message.iconMaskBaseUri != null && Object.hasOwnProperty.call(message, "iconMaskBaseUri")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.iconMaskBaseUri); + if (message.iconBackgroundColor != null && Object.hasOwnProperty.call(message, "iconBackgroundColor")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.iconBackgroundColor); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + $root.google.type.LocalizedText.encode(message.displayName, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.primaryTypeDisplayName != null && Object.hasOwnProperty.call(message, "primaryTypeDisplayName")) + $root.google.type.LocalizedText.encode(message.primaryTypeDisplayName, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.takeout); + if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.delivery); + if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.dineIn); + if (message.curbsidePickup != null && Object.hasOwnProperty.call(message, "curbsidePickup")) + writer.uint32(/* id 36, wireType 0 =*/288).bool(message.curbsidePickup); + if (message.reservable != null && Object.hasOwnProperty.call(message, "reservable")) + writer.uint32(/* id 38, wireType 0 =*/304).bool(message.reservable); + if (message.servesBreakfast != null && Object.hasOwnProperty.call(message, "servesBreakfast")) + writer.uint32(/* id 39, wireType 0 =*/312).bool(message.servesBreakfast); + if (message.servesLunch != null && Object.hasOwnProperty.call(message, "servesLunch")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.servesLunch); + if (message.servesDinner != null && Object.hasOwnProperty.call(message, "servesDinner")) + writer.uint32(/* id 41, wireType 0 =*/328).bool(message.servesDinner); + if (message.servesBeer != null && Object.hasOwnProperty.call(message, "servesBeer")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.servesBeer); + if (message.servesWine != null && Object.hasOwnProperty.call(message, "servesWine")) + writer.uint32(/* id 43, wireType 0 =*/344).bool(message.servesWine); + if (message.servesBrunch != null && Object.hasOwnProperty.call(message, "servesBrunch")) + writer.uint32(/* id 44, wireType 0 =*/352).bool(message.servesBrunch); + if (message.servesVegetarianFood != null && Object.hasOwnProperty.call(message, "servesVegetarianFood")) + writer.uint32(/* id 45, wireType 0 =*/360).bool(message.servesVegetarianFood); + if (message.currentOpeningHours != null && Object.hasOwnProperty.call(message, "currentOpeningHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentOpeningHours, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.currentSecondaryOpeningHours != null && message.currentSecondaryOpeningHours.length) + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentSecondaryOpeningHours[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.regularSecondaryOpeningHours != null && message.regularSecondaryOpeningHours.length) + for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularSecondaryOpeningHours[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.primaryType != null && Object.hasOwnProperty.call(message, "primaryType")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.primaryType); + if (message.shortFormattedAddress != null && Object.hasOwnProperty.call(message, "shortFormattedAddress")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.shortFormattedAddress); + if (message.editorialSummary != null && Object.hasOwnProperty.call(message, "editorialSummary")) + $root.google.type.LocalizedText.encode(message.editorialSummary, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.photos != null && message.photos.length) + for (var i = 0; i < message.photos.length; ++i) + $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.outdoorSeating != null && Object.hasOwnProperty.call(message, "outdoorSeating")) + writer.uint32(/* id 55, wireType 0 =*/440).bool(message.outdoorSeating); + if (message.liveMusic != null && Object.hasOwnProperty.call(message, "liveMusic")) + writer.uint32(/* id 56, wireType 0 =*/448).bool(message.liveMusic); + if (message.menuForChildren != null && Object.hasOwnProperty.call(message, "menuForChildren")) + writer.uint32(/* id 57, wireType 0 =*/456).bool(message.menuForChildren); + if (message.servesCocktails != null && Object.hasOwnProperty.call(message, "servesCocktails")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.servesCocktails); + if (message.servesDessert != null && Object.hasOwnProperty.call(message, "servesDessert")) + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.servesDessert); + if (message.servesCoffee != null && Object.hasOwnProperty.call(message, "servesCoffee")) + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.servesCoffee); + if (message.goodForChildren != null && Object.hasOwnProperty.call(message, "goodForChildren")) + writer.uint32(/* id 62, wireType 0 =*/496).bool(message.goodForChildren); + if (message.allowsDogs != null && Object.hasOwnProperty.call(message, "allowsDogs")) + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.allowsDogs); + if (message.restroom != null && Object.hasOwnProperty.call(message, "restroom")) + writer.uint32(/* id 64, wireType 0 =*/512).bool(message.restroom); + if (message.goodForGroups != null && Object.hasOwnProperty.call(message, "goodForGroups")) + writer.uint32(/* id 65, wireType 0 =*/520).bool(message.goodForGroups); + if (message.goodForWatchingSports != null && Object.hasOwnProperty.call(message, "goodForWatchingSports")) + writer.uint32(/* id 66, wireType 0 =*/528).bool(message.goodForWatchingSports); + if (message.paymentOptions != null && Object.hasOwnProperty.call(message, "paymentOptions")) + $root.google.maps.places.v1.Place.PaymentOptions.encode(message.paymentOptions, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.parkingOptions != null && Object.hasOwnProperty.call(message, "parkingOptions")) + $root.google.maps.places.v1.Place.ParkingOptions.encode(message.parkingOptions, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim(); + if (message.subDestinations != null && message.subDestinations.length) + for (var i = 0; i < message.subDestinations.length; ++i) + $root.google.maps.places.v1.Place.SubDestination.encode(message.subDestinations[i], writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim(); + if (message.accessibilityOptions != null && Object.hasOwnProperty.call(message, "accessibilityOptions")) + $root.google.maps.places.v1.Place.AccessibilityOptions.encode(message.accessibilityOptions, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); + if (message.fuelOptions != null && Object.hasOwnProperty.call(message, "fuelOptions")) + $root.google.maps.places.v1.FuelOptions.encode(message.fuelOptions, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); + if (message.evChargeOptions != null && Object.hasOwnProperty.call(message, "evChargeOptions")) + $root.google.maps.places.v1.EVChargeOptions.encode(message.evChargeOptions, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); + if (message.generativeSummary != null && Object.hasOwnProperty.call(message, "generativeSummary")) + $root.google.maps.places.v1.Place.GenerativeSummary.encode(message.generativeSummary, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim(); + if (message.areaSummary != null && Object.hasOwnProperty.call(message, "areaSummary")) + $root.google.maps.places.v1.Place.AreaSummary.encode(message.areaSummary, writer.uint32(/* id 81, wireType 2 =*/650).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 31: { + message.displayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 50: { + message.primaryType = reader.string(); + break; + } + case 32: { + message.primaryTypeDisplayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 7: { + message.nationalPhoneNumber = reader.string(); + break; + } + case 8: { + message.internationalPhoneNumber = reader.string(); + break; + } + case 9: { + message.formattedAddress = reader.string(); + break; + } + case 51: { + message.shortFormattedAddress = reader.string(); + break; + } + case 10: { + if (!(message.addressComponents && message.addressComponents.length)) + message.addressComponents = []; + message.addressComponents.push($root.google.maps.places.v1.Place.AddressComponent.decode(reader, reader.uint32())); + break; + } + case 11: { + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.decode(reader, reader.uint32()); + break; + } + case 12: { + message.location = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 13: { + message.viewport = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 14: { + message.rating = reader.double(); + break; + } + case 15: { + message.googleMapsUri = reader.string(); + break; + } + case 16: { + message.websiteUri = reader.string(); + break; + } + case 53: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 21: { + message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 22: { + message.utcOffsetMinutes = reader.int32(); + break; + } + case 54: { + if (!(message.photos && message.photos.length)) + message.photos = []; + message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); + break; + } + case 24: { + message.adrFormatAddress = reader.string(); + break; + } + case 25: { + message.businessStatus = reader.int32(); + break; + } + case 26: { + message.priceLevel = reader.int32(); + break; + } + case 27: { + if (!(message.attributions && message.attributions.length)) + message.attributions = []; + message.attributions.push($root.google.maps.places.v1.Place.Attribution.decode(reader, reader.uint32())); + break; + } + case 28: { + message.userRatingCount = reader.int32(); + break; + } + case 29: { + message.iconMaskBaseUri = reader.string(); + break; + } + case 30: { + message.iconBackgroundColor = reader.string(); + break; + } + case 33: { + message.takeout = reader.bool(); + break; + } + case 34: { + message.delivery = reader.bool(); + break; + } + case 35: { + message.dineIn = reader.bool(); + break; + } + case 36: { + message.curbsidePickup = reader.bool(); + break; + } + case 38: { + message.reservable = reader.bool(); + break; + } + case 39: { + message.servesBreakfast = reader.bool(); + break; + } + case 40: { + message.servesLunch = reader.bool(); + break; + } + case 41: { + message.servesDinner = reader.bool(); + break; + } + case 42: { + message.servesBeer = reader.bool(); + break; + } + case 43: { + message.servesWine = reader.bool(); + break; + } + case 44: { + message.servesBrunch = reader.bool(); + break; + } + case 45: { + message.servesVegetarianFood = reader.bool(); + break; + } + case 46: { + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 47: { + if (!(message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length)) + message.currentSecondaryOpeningHours = []; + message.currentSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 49: { + if (!(message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length)) + message.regularSecondaryOpeningHours = []; + message.regularSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 52: { + message.editorialSummary = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 55: { + message.outdoorSeating = reader.bool(); + break; + } + case 56: { + message.liveMusic = reader.bool(); + break; + } + case 57: { + message.menuForChildren = reader.bool(); + break; + } + case 58: { + message.servesCocktails = reader.bool(); + break; + } + case 59: { + message.servesDessert = reader.bool(); + break; + } + case 60: { + message.servesCoffee = reader.bool(); + break; + } + case 62: { + message.goodForChildren = reader.bool(); + break; + } + case 63: { + message.allowsDogs = reader.bool(); + break; + } + case 64: { + message.restroom = reader.bool(); + break; + } + case 65: { + message.goodForGroups = reader.bool(); + break; + } + case 66: { + message.goodForWatchingSports = reader.bool(); + break; + } + case 67: { + message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.decode(reader, reader.uint32()); + break; + } + case 70: { + message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.decode(reader, reader.uint32()); + break; + } + case 71: { + if (!(message.subDestinations && message.subDestinations.length)) + message.subDestinations = []; + message.subDestinations.push($root.google.maps.places.v1.Place.SubDestination.decode(reader, reader.uint32())); + break; + } + case 72: { + message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.decode(reader, reader.uint32()); + break; + } + case 78: { + message.fuelOptions = $root.google.maps.places.v1.FuelOptions.decode(reader, reader.uint32()); + break; + } + case 79: { + message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.decode(reader, reader.uint32()); + break; + } + case 80: { + message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.decode(reader, reader.uint32()); + break; + } + case 81: { + message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + var error = $root.google.type.LocalizedText.verify(message.displayName); + if (error) + return "displayName." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.primaryType != null && message.hasOwnProperty("primaryType")) + if (!$util.isString(message.primaryType)) + return "primaryType: string expected"; + if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) { + var error = $root.google.type.LocalizedText.verify(message.primaryTypeDisplayName); + if (error) + return "primaryTypeDisplayName." + error; + } + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + if (!$util.isString(message.nationalPhoneNumber)) + return "nationalPhoneNumber: string expected"; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + if (!$util.isString(message.internationalPhoneNumber)) + return "internationalPhoneNumber: string expected"; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + if (!$util.isString(message.formattedAddress)) + return "formattedAddress: string expected"; + if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) + if (!$util.isString(message.shortFormattedAddress)) + return "shortFormattedAddress: string expected"; + if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) { + if (!Array.isArray(message.addressComponents)) + return "addressComponents: array expected"; + for (var i = 0; i < message.addressComponents.length; ++i) { + var error = $root.google.maps.places.v1.Place.AddressComponent.verify(message.addressComponents[i]); + if (error) + return "addressComponents." + error; + } + } + if (message.plusCode != null && message.hasOwnProperty("plusCode")) { + var error = $root.google.maps.places.v1.Place.PlusCode.verify(message.plusCode); + if (error) + return "plusCode." + error; + } + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.type.LatLng.verify(message.location); + if (error) + return "location." + error; + } + if (message.viewport != null && message.hasOwnProperty("viewport")) { + var error = $root.google.geo.type.Viewport.verify(message.viewport); + if (error) + return "viewport." + error; + } + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + if (!$util.isString(message.googleMapsUri)) + return "googleMapsUri: string expected"; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + if (!$util.isString(message.websiteUri)) + return "websiteUri: string expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } + } + if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularOpeningHours); + if (error) + return "regularOpeningHours." + error; + } + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { + properties._utcOffsetMinutes = 1; + if (!$util.isInteger(message.utcOffsetMinutes)) + return "utcOffsetMinutes: integer expected"; + } + if (message.photos != null && message.hasOwnProperty("photos")) { + if (!Array.isArray(message.photos)) + return "photos: array expected"; + for (var i = 0; i < message.photos.length; ++i) { + var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); + if (error) + return "photos." + error; + } + } + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + if (!$util.isString(message.adrFormatAddress)) + return "adrFormatAddress: string expected"; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + switch (message.businessStatus) { + default: + return "businessStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + switch (message.priceLevel) { + default: + return "priceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.attributions != null && message.hasOwnProperty("attributions")) { + if (!Array.isArray(message.attributions)) + return "attributions: array expected"; + for (var i = 0; i < message.attributions.length; ++i) { + var error = $root.google.maps.places.v1.Place.Attribution.verify(message.attributions[i]); + if (error) + return "attributions." + error; + } + } + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { + properties._userRatingCount = 1; + if (!$util.isInteger(message.userRatingCount)) + return "userRatingCount: integer expected"; + } + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + if (!$util.isString(message.iconMaskBaseUri)) + return "iconMaskBaseUri: string expected"; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + if (!$util.isString(message.iconBackgroundColor)) + return "iconBackgroundColor: string expected"; + if (message.takeout != null && message.hasOwnProperty("takeout")) { + properties._takeout = 1; + if (typeof message.takeout !== "boolean") + return "takeout: boolean expected"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + properties._delivery = 1; + if (typeof message.delivery !== "boolean") + return "delivery: boolean expected"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + properties._dineIn = 1; + if (typeof message.dineIn !== "boolean") + return "dineIn: boolean expected"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + properties._curbsidePickup = 1; + if (typeof message.curbsidePickup !== "boolean") + return "curbsidePickup: boolean expected"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + properties._reservable = 1; + if (typeof message.reservable !== "boolean") + return "reservable: boolean expected"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + properties._servesBreakfast = 1; + if (typeof message.servesBreakfast !== "boolean") + return "servesBreakfast: boolean expected"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + properties._servesLunch = 1; + if (typeof message.servesLunch !== "boolean") + return "servesLunch: boolean expected"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + properties._servesDinner = 1; + if (typeof message.servesDinner !== "boolean") + return "servesDinner: boolean expected"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + properties._servesBeer = 1; + if (typeof message.servesBeer !== "boolean") + return "servesBeer: boolean expected"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + properties._servesWine = 1; + if (typeof message.servesWine !== "boolean") + return "servesWine: boolean expected"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + properties._servesBrunch = 1; + if (typeof message.servesBrunch !== "boolean") + return "servesBrunch: boolean expected"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + properties._servesVegetarianFood = 1; + if (typeof message.servesVegetarianFood !== "boolean") + return "servesVegetarianFood: boolean expected"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentOpeningHours); + if (error) + return "currentOpeningHours." + error; + } + if (message.currentSecondaryOpeningHours != null && message.hasOwnProperty("currentSecondaryOpeningHours")) { + if (!Array.isArray(message.currentSecondaryOpeningHours)) + return "currentSecondaryOpeningHours: array expected"; + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentSecondaryOpeningHours[i]); + if (error) + return "currentSecondaryOpeningHours." + error; + } + } + if (message.regularSecondaryOpeningHours != null && message.hasOwnProperty("regularSecondaryOpeningHours")) { + if (!Array.isArray(message.regularSecondaryOpeningHours)) + return "regularSecondaryOpeningHours: array expected"; + for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularSecondaryOpeningHours[i]); + if (error) + return "regularSecondaryOpeningHours." + error; + } + } + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) { + var error = $root.google.type.LocalizedText.verify(message.editorialSummary); + if (error) + return "editorialSummary." + error; + } + if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { + properties._outdoorSeating = 1; + if (typeof message.outdoorSeating !== "boolean") + return "outdoorSeating: boolean expected"; + } + if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { + properties._liveMusic = 1; + if (typeof message.liveMusic !== "boolean") + return "liveMusic: boolean expected"; + } + if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { + properties._menuForChildren = 1; + if (typeof message.menuForChildren !== "boolean") + return "menuForChildren: boolean expected"; + } + if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { + properties._servesCocktails = 1; + if (typeof message.servesCocktails !== "boolean") + return "servesCocktails: boolean expected"; + } + if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { + properties._servesDessert = 1; + if (typeof message.servesDessert !== "boolean") + return "servesDessert: boolean expected"; + } + if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { + properties._servesCoffee = 1; + if (typeof message.servesCoffee !== "boolean") + return "servesCoffee: boolean expected"; + } + if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { + properties._goodForChildren = 1; + if (typeof message.goodForChildren !== "boolean") + return "goodForChildren: boolean expected"; + } + if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { + properties._allowsDogs = 1; + if (typeof message.allowsDogs !== "boolean") + return "allowsDogs: boolean expected"; + } + if (message.restroom != null && message.hasOwnProperty("restroom")) { + properties._restroom = 1; + if (typeof message.restroom !== "boolean") + return "restroom: boolean expected"; + } + if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { + properties._goodForGroups = 1; + if (typeof message.goodForGroups !== "boolean") + return "goodForGroups: boolean expected"; + } + if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { + properties._goodForWatchingSports = 1; + if (typeof message.goodForWatchingSports !== "boolean") + return "goodForWatchingSports: boolean expected"; + } + if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) { + var error = $root.google.maps.places.v1.Place.PaymentOptions.verify(message.paymentOptions); + if (error) + return "paymentOptions." + error; + } + if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) { + var error = $root.google.maps.places.v1.Place.ParkingOptions.verify(message.parkingOptions); + if (error) + return "parkingOptions." + error; + } + if (message.subDestinations != null && message.hasOwnProperty("subDestinations")) { + if (!Array.isArray(message.subDestinations)) + return "subDestinations: array expected"; + for (var i = 0; i < message.subDestinations.length; ++i) { + var error = $root.google.maps.places.v1.Place.SubDestination.verify(message.subDestinations[i]); + if (error) + return "subDestinations." + error; + } + } + if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { + properties._accessibilityOptions = 1; + { + var error = $root.google.maps.places.v1.Place.AccessibilityOptions.verify(message.accessibilityOptions); + if (error) + return "accessibilityOptions." + error; + } + } + if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) { + var error = $root.google.maps.places.v1.FuelOptions.verify(message.fuelOptions); + if (error) + return "fuelOptions." + error; + } + if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) { + var error = $root.google.maps.places.v1.EVChargeOptions.verify(message.evChargeOptions); + if (error) + return "evChargeOptions." + error; + } + if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) { + var error = $root.google.maps.places.v1.Place.GenerativeSummary.verify(message.generativeSummary); + if (error) + return "generativeSummary." + error; + } + if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) { + var error = $root.google.maps.places.v1.Place.AreaSummary.verify(message.areaSummary); + if (error) + return "areaSummary." + error; + } + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place) + return object; + var message = new $root.google.maps.places.v1.Place(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) { + if (typeof object.displayName !== "object") + throw TypeError(".google.maps.places.v1.Place.displayName: object expected"); + message.displayName = $root.google.type.LocalizedText.fromObject(object.displayName); + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.primaryType != null) + message.primaryType = String(object.primaryType); + if (object.primaryTypeDisplayName != null) { + if (typeof object.primaryTypeDisplayName !== "object") + throw TypeError(".google.maps.places.v1.Place.primaryTypeDisplayName: object expected"); + message.primaryTypeDisplayName = $root.google.type.LocalizedText.fromObject(object.primaryTypeDisplayName); + } + if (object.nationalPhoneNumber != null) + message.nationalPhoneNumber = String(object.nationalPhoneNumber); + if (object.internationalPhoneNumber != null) + message.internationalPhoneNumber = String(object.internationalPhoneNumber); + if (object.formattedAddress != null) + message.formattedAddress = String(object.formattedAddress); + if (object.shortFormattedAddress != null) + message.shortFormattedAddress = String(object.shortFormattedAddress); + if (object.addressComponents) { + if (!Array.isArray(object.addressComponents)) + throw TypeError(".google.maps.places.v1.Place.addressComponents: array expected"); + message.addressComponents = []; + for (var i = 0; i < object.addressComponents.length; ++i) { + if (typeof object.addressComponents[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.addressComponents: object expected"); + message.addressComponents[i] = $root.google.maps.places.v1.Place.AddressComponent.fromObject(object.addressComponents[i]); + } + } + if (object.plusCode != null) { + if (typeof object.plusCode !== "object") + throw TypeError(".google.maps.places.v1.Place.plusCode: object expected"); + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.fromObject(object.plusCode); + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.maps.places.v1.Place.location: object expected"); + message.location = $root.google.type.LatLng.fromObject(object.location); + } + if (object.viewport != null) { + if (typeof object.viewport !== "object") + throw TypeError(".google.maps.places.v1.Place.viewport: object expected"); + message.viewport = $root.google.geo.type.Viewport.fromObject(object.viewport); + } + if (object.rating != null) + message.rating = Number(object.rating); + if (object.googleMapsUri != null) + message.googleMapsUri = String(object.googleMapsUri); + if (object.websiteUri != null) + message.websiteUri = String(object.websiteUri); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.Place.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.regularOpeningHours != null) { + if (typeof object.regularOpeningHours !== "object") + throw TypeError(".google.maps.places.v1.Place.regularOpeningHours: object expected"); + message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularOpeningHours); + } + if (object.utcOffsetMinutes != null) + message.utcOffsetMinutes = object.utcOffsetMinutes | 0; + if (object.photos) { + if (!Array.isArray(object.photos)) + throw TypeError(".google.maps.places.v1.Place.photos: array expected"); + message.photos = []; + for (var i = 0; i < object.photos.length; ++i) { + if (typeof object.photos[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.photos: object expected"); + message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); + } + } + if (object.adrFormatAddress != null) + message.adrFormatAddress = String(object.adrFormatAddress); + switch (object.businessStatus) { + default: + if (typeof object.businessStatus === "number") { + message.businessStatus = object.businessStatus; + break; + } + break; + case "BUSINESS_STATUS_UNSPECIFIED": + case 0: + message.businessStatus = 0; + break; + case "OPERATIONAL": + case 1: + message.businessStatus = 1; + break; + case "CLOSED_TEMPORARILY": + case 2: + message.businessStatus = 2; + break; + case "CLOSED_PERMANENTLY": + case 3: + message.businessStatus = 3; + break; + } + switch (object.priceLevel) { + default: + if (typeof object.priceLevel === "number") { + message.priceLevel = object.priceLevel; + break; + } + break; + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevel = 0; + break; + case "PRICE_LEVEL_FREE": + case 1: + message.priceLevel = 1; + break; + case "PRICE_LEVEL_INEXPENSIVE": + case 2: + message.priceLevel = 2; + break; + case "PRICE_LEVEL_MODERATE": + case 3: + message.priceLevel = 3; + break; + case "PRICE_LEVEL_EXPENSIVE": + case 4: + message.priceLevel = 4; + break; + case "PRICE_LEVEL_VERY_EXPENSIVE": + case 5: + message.priceLevel = 5; + break; + } + if (object.attributions) { + if (!Array.isArray(object.attributions)) + throw TypeError(".google.maps.places.v1.Place.attributions: array expected"); + message.attributions = []; + for (var i = 0; i < object.attributions.length; ++i) { + if (typeof object.attributions[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.attributions: object expected"); + message.attributions[i] = $root.google.maps.places.v1.Place.Attribution.fromObject(object.attributions[i]); + } + } + if (object.userRatingCount != null) + message.userRatingCount = object.userRatingCount | 0; + if (object.iconMaskBaseUri != null) + message.iconMaskBaseUri = String(object.iconMaskBaseUri); + if (object.iconBackgroundColor != null) + message.iconBackgroundColor = String(object.iconBackgroundColor); + if (object.takeout != null) + message.takeout = Boolean(object.takeout); + if (object.delivery != null) + message.delivery = Boolean(object.delivery); + if (object.dineIn != null) + message.dineIn = Boolean(object.dineIn); + if (object.curbsidePickup != null) + message.curbsidePickup = Boolean(object.curbsidePickup); + if (object.reservable != null) + message.reservable = Boolean(object.reservable); + if (object.servesBreakfast != null) + message.servesBreakfast = Boolean(object.servesBreakfast); + if (object.servesLunch != null) + message.servesLunch = Boolean(object.servesLunch); + if (object.servesDinner != null) + message.servesDinner = Boolean(object.servesDinner); + if (object.servesBeer != null) + message.servesBeer = Boolean(object.servesBeer); + if (object.servesWine != null) + message.servesWine = Boolean(object.servesWine); + if (object.servesBrunch != null) + message.servesBrunch = Boolean(object.servesBrunch); + if (object.servesVegetarianFood != null) + message.servesVegetarianFood = Boolean(object.servesVegetarianFood); + if (object.currentOpeningHours != null) { + if (typeof object.currentOpeningHours !== "object") + throw TypeError(".google.maps.places.v1.Place.currentOpeningHours: object expected"); + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentOpeningHours); + } + if (object.currentSecondaryOpeningHours) { + if (!Array.isArray(object.currentSecondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: array expected"); + message.currentSecondaryOpeningHours = []; + for (var i = 0; i < object.currentSecondaryOpeningHours.length; ++i) { + if (typeof object.currentSecondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: object expected"); + message.currentSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentSecondaryOpeningHours[i]); + } + } + if (object.regularSecondaryOpeningHours) { + if (!Array.isArray(object.regularSecondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: array expected"); + message.regularSecondaryOpeningHours = []; + for (var i = 0; i < object.regularSecondaryOpeningHours.length; ++i) { + if (typeof object.regularSecondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: object expected"); + message.regularSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularSecondaryOpeningHours[i]); + } + } + if (object.editorialSummary != null) { + if (typeof object.editorialSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.editorialSummary: object expected"); + message.editorialSummary = $root.google.type.LocalizedText.fromObject(object.editorialSummary); + } + if (object.outdoorSeating != null) + message.outdoorSeating = Boolean(object.outdoorSeating); + if (object.liveMusic != null) + message.liveMusic = Boolean(object.liveMusic); + if (object.menuForChildren != null) + message.menuForChildren = Boolean(object.menuForChildren); + if (object.servesCocktails != null) + message.servesCocktails = Boolean(object.servesCocktails); + if (object.servesDessert != null) + message.servesDessert = Boolean(object.servesDessert); + if (object.servesCoffee != null) + message.servesCoffee = Boolean(object.servesCoffee); + if (object.goodForChildren != null) + message.goodForChildren = Boolean(object.goodForChildren); + if (object.allowsDogs != null) + message.allowsDogs = Boolean(object.allowsDogs); + if (object.restroom != null) + message.restroom = Boolean(object.restroom); + if (object.goodForGroups != null) + message.goodForGroups = Boolean(object.goodForGroups); + if (object.goodForWatchingSports != null) + message.goodForWatchingSports = Boolean(object.goodForWatchingSports); + if (object.paymentOptions != null) { + if (typeof object.paymentOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.paymentOptions: object expected"); + message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.fromObject(object.paymentOptions); + } + if (object.parkingOptions != null) { + if (typeof object.parkingOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.parkingOptions: object expected"); + message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.fromObject(object.parkingOptions); + } + if (object.subDestinations) { + if (!Array.isArray(object.subDestinations)) + throw TypeError(".google.maps.places.v1.Place.subDestinations: array expected"); + message.subDestinations = []; + for (var i = 0; i < object.subDestinations.length; ++i) { + if (typeof object.subDestinations[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.subDestinations: object expected"); + message.subDestinations[i] = $root.google.maps.places.v1.Place.SubDestination.fromObject(object.subDestinations[i]); + } + } + if (object.accessibilityOptions != null) { + if (typeof object.accessibilityOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.accessibilityOptions: object expected"); + message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.fromObject(object.accessibilityOptions); + } + if (object.fuelOptions != null) { + if (typeof object.fuelOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.fuelOptions: object expected"); + message.fuelOptions = $root.google.maps.places.v1.FuelOptions.fromObject(object.fuelOptions); + } + if (object.evChargeOptions != null) { + if (typeof object.evChargeOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.evChargeOptions: object expected"); + message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.fromObject(object.evChargeOptions); + } + if (object.generativeSummary != null) { + if (typeof object.generativeSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.generativeSummary: object expected"); + message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.fromObject(object.generativeSummary); + } + if (object.areaSummary != null) { + if (typeof object.areaSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.areaSummary: object expected"); + message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.fromObject(object.areaSummary); + } + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.types = []; + object.addressComponents = []; + object.attributions = []; + object.currentSecondaryOpeningHours = []; + object.regularSecondaryOpeningHours = []; + object.reviews = []; + object.photos = []; + object.subDestinations = []; + } + if (options.defaults) { + object.name = ""; + object.id = ""; + object.nationalPhoneNumber = ""; + object.internationalPhoneNumber = ""; + object.formattedAddress = ""; + object.plusCode = null; + object.location = null; + object.viewport = null; + object.rating = 0; + object.googleMapsUri = ""; + object.websiteUri = ""; + object.regularOpeningHours = null; + object.adrFormatAddress = ""; + object.businessStatus = options.enums === String ? "BUSINESS_STATUS_UNSPECIFIED" : 0; + object.priceLevel = options.enums === String ? "PRICE_LEVEL_UNSPECIFIED" : 0; + object.iconMaskBaseUri = ""; + object.iconBackgroundColor = ""; + object.displayName = null; + object.primaryTypeDisplayName = null; + object.currentOpeningHours = null; + object.primaryType = ""; + object.shortFormattedAddress = ""; + object.editorialSummary = null; + object.paymentOptions = null; + object.parkingOptions = null; + object.fuelOptions = null; + object.evChargeOptions = null; + object.generativeSummary = null; + object.areaSummary = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + object.nationalPhoneNumber = message.nationalPhoneNumber; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + object.internationalPhoneNumber = message.internationalPhoneNumber; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + object.formattedAddress = message.formattedAddress; + if (message.addressComponents && message.addressComponents.length) { + object.addressComponents = []; + for (var j = 0; j < message.addressComponents.length; ++j) + object.addressComponents[j] = $root.google.maps.places.v1.Place.AddressComponent.toObject(message.addressComponents[j], options); + } + if (message.plusCode != null && message.hasOwnProperty("plusCode")) + object.plusCode = $root.google.maps.places.v1.Place.PlusCode.toObject(message.plusCode, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.type.LatLng.toObject(message.location, options); + if (message.viewport != null && message.hasOwnProperty("viewport")) + object.viewport = $root.google.geo.type.Viewport.toObject(message.viewport, options); + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + object.googleMapsUri = message.googleMapsUri; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + object.websiteUri = message.websiteUri; + if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) + object.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularOpeningHours, options); + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { + object.utcOffsetMinutes = message.utcOffsetMinutes; + if (options.oneofs) + object._utcOffsetMinutes = "utcOffsetMinutes"; + } + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + object.adrFormatAddress = message.adrFormatAddress; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + object.businessStatus = options.enums === String ? $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] === undefined ? message.businessStatus : $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] : message.businessStatus; + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + object.priceLevel = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevel] === undefined ? message.priceLevel : $root.google.maps.places.v1.PriceLevel[message.priceLevel] : message.priceLevel; + if (message.attributions && message.attributions.length) { + object.attributions = []; + for (var j = 0; j < message.attributions.length; ++j) + object.attributions[j] = $root.google.maps.places.v1.Place.Attribution.toObject(message.attributions[j], options); + } + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { + object.userRatingCount = message.userRatingCount; + if (options.oneofs) + object._userRatingCount = "userRatingCount"; + } + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + object.iconMaskBaseUri = message.iconMaskBaseUri; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + object.iconBackgroundColor = message.iconBackgroundColor; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = $root.google.type.LocalizedText.toObject(message.displayName, options); + if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) + object.primaryTypeDisplayName = $root.google.type.LocalizedText.toObject(message.primaryTypeDisplayName, options); + if (message.takeout != null && message.hasOwnProperty("takeout")) { + object.takeout = message.takeout; + if (options.oneofs) + object._takeout = "takeout"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + object.delivery = message.delivery; + if (options.oneofs) + object._delivery = "delivery"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + object.dineIn = message.dineIn; + if (options.oneofs) + object._dineIn = "dineIn"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + object.curbsidePickup = message.curbsidePickup; + if (options.oneofs) + object._curbsidePickup = "curbsidePickup"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + object.reservable = message.reservable; + if (options.oneofs) + object._reservable = "reservable"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + object.servesBreakfast = message.servesBreakfast; + if (options.oneofs) + object._servesBreakfast = "servesBreakfast"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + object.servesLunch = message.servesLunch; + if (options.oneofs) + object._servesLunch = "servesLunch"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + object.servesDinner = message.servesDinner; + if (options.oneofs) + object._servesDinner = "servesDinner"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + object.servesBeer = message.servesBeer; + if (options.oneofs) + object._servesBeer = "servesBeer"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + object.servesWine = message.servesWine; + if (options.oneofs) + object._servesWine = "servesWine"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + object.servesBrunch = message.servesBrunch; + if (options.oneofs) + object._servesBrunch = "servesBrunch"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + object.servesVegetarianFood = message.servesVegetarianFood; + if (options.oneofs) + object._servesVegetarianFood = "servesVegetarianFood"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) + object.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentOpeningHours, options); + if (message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length) { + object.currentSecondaryOpeningHours = []; + for (var j = 0; j < message.currentSecondaryOpeningHours.length; ++j) + object.currentSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentSecondaryOpeningHours[j], options); + } + if (message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length) { + object.regularSecondaryOpeningHours = []; + for (var j = 0; j < message.regularSecondaryOpeningHours.length; ++j) + object.regularSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularSecondaryOpeningHours[j], options); + } + if (message.primaryType != null && message.hasOwnProperty("primaryType")) + object.primaryType = message.primaryType; + if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) + object.shortFormattedAddress = message.shortFormattedAddress; + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) + object.editorialSummary = $root.google.type.LocalizedText.toObject(message.editorialSummary, options); + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); + } + if (message.photos && message.photos.length) { + object.photos = []; + for (var j = 0; j < message.photos.length; ++j) + object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); + } + if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { + object.outdoorSeating = message.outdoorSeating; + if (options.oneofs) + object._outdoorSeating = "outdoorSeating"; + } + if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { + object.liveMusic = message.liveMusic; + if (options.oneofs) + object._liveMusic = "liveMusic"; + } + if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { + object.menuForChildren = message.menuForChildren; + if (options.oneofs) + object._menuForChildren = "menuForChildren"; + } + if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { + object.servesCocktails = message.servesCocktails; + if (options.oneofs) + object._servesCocktails = "servesCocktails"; + } + if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { + object.servesDessert = message.servesDessert; + if (options.oneofs) + object._servesDessert = "servesDessert"; + } + if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { + object.servesCoffee = message.servesCoffee; + if (options.oneofs) + object._servesCoffee = "servesCoffee"; + } + if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { + object.goodForChildren = message.goodForChildren; + if (options.oneofs) + object._goodForChildren = "goodForChildren"; + } + if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { + object.allowsDogs = message.allowsDogs; + if (options.oneofs) + object._allowsDogs = "allowsDogs"; + } + if (message.restroom != null && message.hasOwnProperty("restroom")) { + object.restroom = message.restroom; + if (options.oneofs) + object._restroom = "restroom"; + } + if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { + object.goodForGroups = message.goodForGroups; + if (options.oneofs) + object._goodForGroups = "goodForGroups"; + } + if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { + object.goodForWatchingSports = message.goodForWatchingSports; + if (options.oneofs) + object._goodForWatchingSports = "goodForWatchingSports"; + } + if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) + object.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.toObject(message.paymentOptions, options); + if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) + object.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.toObject(message.parkingOptions, options); + if (message.subDestinations && message.subDestinations.length) { + object.subDestinations = []; + for (var j = 0; j < message.subDestinations.length; ++j) + object.subDestinations[j] = $root.google.maps.places.v1.Place.SubDestination.toObject(message.subDestinations[j], options); + } + if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { + object.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.toObject(message.accessibilityOptions, options); + if (options.oneofs) + object._accessibilityOptions = "accessibilityOptions"; + } + if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) + object.fuelOptions = $root.google.maps.places.v1.FuelOptions.toObject(message.fuelOptions, options); + if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) + object.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.toObject(message.evChargeOptions, options); + if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) + object.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.toObject(message.generativeSummary, options); + if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) + object.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.toObject(message.areaSummary, options); + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof google.maps.places.v1.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place"; + }; + + Place.AddressComponent = (function() { + + /** + * Properties of an AddressComponent. + * @memberof google.maps.places.v1.Place + * @interface IAddressComponent + * @property {string|null} [longText] AddressComponent longText + * @property {string|null} [shortText] AddressComponent shortText + * @property {Array.|null} [types] AddressComponent types + * @property {string|null} [languageCode] AddressComponent languageCode + */ + + /** + * Constructs a new AddressComponent. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AddressComponent. + * @implements IAddressComponent + * @constructor + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + */ + function AddressComponent(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddressComponent longText. + * @member {string} longText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.longText = ""; + + /** + * AddressComponent shortText. + * @member {string} shortText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.shortText = ""; + + /** + * AddressComponent types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.types = $util.emptyArray; + + /** + * AddressComponent languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.languageCode = ""; + + /** + * Creates a new AddressComponent instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent instance + */ + AddressComponent.create = function create(properties) { + return new AddressComponent(properties); + }; + + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longText != null && Object.hasOwnProperty.call(message, "longText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.longText); + if (message.shortText != null && Object.hasOwnProperty.call(message, "shortText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortText); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.types[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AddressComponent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.longText = reader.string(); + break; + } + case 2: { + message.shortText = reader.string(); + break; + } + case 3: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressComponent message. + * @function verify + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressComponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.longText != null && message.hasOwnProperty("longText")) + if (!$util.isString(message.longText)) + return "longText: string expected"; + if (message.shortText != null && message.hasOwnProperty("shortText")) + if (!$util.isString(message.shortText)) + return "shortText: string expected"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + */ + AddressComponent.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AddressComponent) + return object; + var message = new $root.google.maps.places.v1.Place.AddressComponent(); + if (object.longText != null) + message.longText = String(object.longText); + if (object.shortText != null) + message.shortText = String(object.shortText); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.AddressComponent.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.AddressComponent} message AddressComponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressComponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) { + object.longText = ""; + object.shortText = ""; + object.languageCode = ""; + } + if (message.longText != null && message.hasOwnProperty("longText")) + object.longText = message.longText; + if (message.shortText != null && message.hasOwnProperty("shortText")) + object.shortText = message.shortText; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this AddressComponent to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + * @returns {Object.} JSON object + */ + AddressComponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddressComponent + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AddressComponent"; + }; + + return AddressComponent; + })(); + + Place.PlusCode = (function() { + + /** + * Properties of a PlusCode. + * @memberof google.maps.places.v1.Place + * @interface IPlusCode + * @property {string|null} [globalCode] PlusCode globalCode + * @property {string|null} [compoundCode] PlusCode compoundCode + */ + + /** + * Constructs a new PlusCode. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a PlusCode. + * @implements IPlusCode + * @constructor + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + */ + function PlusCode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlusCode globalCode. + * @member {string} globalCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.globalCode = ""; + + /** + * PlusCode compoundCode. + * @member {string} compoundCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.compoundCode = ""; + + /** + * Creates a new PlusCode instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode instance + */ + PlusCode.create = function create(properties) { + return new PlusCode(properties); + }; + + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode); + if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode); + return writer; + }; + + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PlusCode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.globalCode = reader.string(); + break; + } + case 2: { + message.compoundCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlusCode message. + * @function verify + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlusCode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + if (!$util.isString(message.globalCode)) + return "globalCode: string expected"; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + if (!$util.isString(message.compoundCode)) + return "compoundCode: string expected"; + return null; + }; + + /** + * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + */ + PlusCode.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.PlusCode) + return object; + var message = new $root.google.maps.places.v1.Place.PlusCode(); + if (object.globalCode != null) + message.globalCode = String(object.globalCode); + if (object.compoundCode != null) + message.compoundCode = String(object.compoundCode); + return message; + }; + + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.PlusCode} message PlusCode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlusCode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.globalCode = ""; + object.compoundCode = ""; + } + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + object.globalCode = message.globalCode; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + object.compoundCode = message.compoundCode; + return object; + }; + + /** + * Converts this PlusCode to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + * @returns {Object.} JSON object + */ + PlusCode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlusCode + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.PlusCode"; + }; + + return PlusCode; + })(); + + Place.OpeningHours = (function() { + + /** + * Properties of an OpeningHours. + * @memberof google.maps.places.v1.Place + * @interface IOpeningHours + * @property {boolean|null} [openNow] OpeningHours openNow + * @property {Array.|null} [periods] OpeningHours periods + * @property {Array.|null} [weekdayDescriptions] OpeningHours weekdayDescriptions + * @property {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null} [secondaryHoursType] OpeningHours secondaryHoursType + * @property {Array.|null} [specialDays] OpeningHours specialDays + */ + + /** + * Constructs a new OpeningHours. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an OpeningHours. + * @implements IOpeningHours + * @constructor + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + */ + function OpeningHours(properties) { + this.periods = []; + this.weekdayDescriptions = []; + this.specialDays = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OpeningHours openNow. + * @member {boolean|null|undefined} openNow + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.openNow = null; + + /** + * OpeningHours periods. + * @member {Array.} periods + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.periods = $util.emptyArray; + + /** + * OpeningHours weekdayDescriptions. + * @member {Array.} weekdayDescriptions + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.weekdayDescriptions = $util.emptyArray; + + /** + * OpeningHours secondaryHoursType. + * @member {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType} secondaryHoursType + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.secondaryHoursType = 0; + + /** + * OpeningHours specialDays. + * @member {Array.} specialDays + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.specialDays = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OpeningHours _openNow. + * @member {"openNow"|undefined} _openNow + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + Object.defineProperty(OpeningHours.prototype, "_openNow", { + get: $util.oneOfGetter($oneOfFields = ["openNow"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OpeningHours instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours instance + */ + OpeningHours.create = function create(properties) { + return new OpeningHours(properties); + }; + + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.openNow); + if (message.periods != null && message.periods.length) + for (var i = 0; i < message.periods.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.Period.encode(message.periods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.weekdayDescriptions != null && message.weekdayDescriptions.length) + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.weekdayDescriptions[i]); + if (message.secondaryHoursType != null && Object.hasOwnProperty.call(message, "secondaryHoursType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secondaryHoursType); + if (message.specialDays != null && message.specialDays.length) + for (var i = 0; i < message.specialDays.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.encode(message.specialDays[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.openNow = reader.bool(); + break; + } + case 2: { + if (!(message.periods && message.periods.length)) + message.periods = []; + message.periods.push($root.google.maps.places.v1.Place.OpeningHours.Period.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.weekdayDescriptions && message.weekdayDescriptions.length)) + message.weekdayDescriptions = []; + message.weekdayDescriptions.push(reader.string()); + break; + } + case 4: { + message.secondaryHoursType = reader.int32(); + break; + } + case 5: { + if (!(message.specialDays && message.specialDays.length)) + message.specialDays = []; + message.specialDays.push($root.google.maps.places.v1.Place.OpeningHours.SpecialDay.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpeningHours message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpeningHours.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.openNow != null && message.hasOwnProperty("openNow")) { + properties._openNow = 1; + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; + } + if (message.periods != null && message.hasOwnProperty("periods")) { + if (!Array.isArray(message.periods)) + return "periods: array expected"; + for (var i = 0; i < message.periods.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.verify(message.periods[i]); + if (error) + return "periods." + error; + } + } + if (message.weekdayDescriptions != null && message.hasOwnProperty("weekdayDescriptions")) { + if (!Array.isArray(message.weekdayDescriptions)) + return "weekdayDescriptions: array expected"; + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + if (!$util.isString(message.weekdayDescriptions[i])) + return "weekdayDescriptions: string[] expected"; + } + if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) + switch (message.secondaryHoursType) { + default: + return "secondaryHoursType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.specialDays != null && message.hasOwnProperty("specialDays")) { + if (!Array.isArray(message.specialDays)) + return "specialDays: array expected"; + for (var i = 0; i < message.specialDays.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.verify(message.specialDays[i]); + if (error) + return "specialDays." + error; + } + } + return null; + }; + + /** + * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + */ + OpeningHours.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours(); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.periods) { + if (!Array.isArray(object.periods)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: array expected"); + message.periods = []; + for (var i = 0; i < object.periods.length; ++i) { + if (typeof object.periods[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: object expected"); + message.periods[i] = $root.google.maps.places.v1.Place.OpeningHours.Period.fromObject(object.periods[i]); + } + } + if (object.weekdayDescriptions) { + if (!Array.isArray(object.weekdayDescriptions)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.weekdayDescriptions: array expected"); + message.weekdayDescriptions = []; + for (var i = 0; i < object.weekdayDescriptions.length; ++i) + message.weekdayDescriptions[i] = String(object.weekdayDescriptions[i]); + } + switch (object.secondaryHoursType) { + default: + if (typeof object.secondaryHoursType === "number") { + message.secondaryHoursType = object.secondaryHoursType; + break; + } + break; + case "SECONDARY_HOURS_TYPE_UNSPECIFIED": + case 0: + message.secondaryHoursType = 0; + break; + case "DRIVE_THROUGH": + case 1: + message.secondaryHoursType = 1; + break; + case "HAPPY_HOUR": + case 2: + message.secondaryHoursType = 2; + break; + case "DELIVERY": + case 3: + message.secondaryHoursType = 3; + break; + case "TAKEOUT": + case 4: + message.secondaryHoursType = 4; + break; + case "KITCHEN": + case 5: + message.secondaryHoursType = 5; + break; + case "BREAKFAST": + case 6: + message.secondaryHoursType = 6; + break; + case "LUNCH": + case 7: + message.secondaryHoursType = 7; + break; + case "DINNER": + case 8: + message.secondaryHoursType = 8; + break; + case "BRUNCH": + case 9: + message.secondaryHoursType = 9; + break; + case "PICKUP": + case 10: + message.secondaryHoursType = 10; + break; + case "ACCESS": + case 11: + message.secondaryHoursType = 11; + break; + case "SENIOR_HOURS": + case 12: + message.secondaryHoursType = 12; + break; + case "ONLINE_SERVICE_HOURS": + case 13: + message.secondaryHoursType = 13; + break; + } + if (object.specialDays) { + if (!Array.isArray(object.specialDays)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: array expected"); + message.specialDays = []; + for (var i = 0; i < object.specialDays.length; ++i) { + if (typeof object.specialDays[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: object expected"); + message.specialDays[i] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.fromObject(object.specialDays[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.OpeningHours} message OpeningHours + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpeningHours.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.periods = []; + object.weekdayDescriptions = []; + object.specialDays = []; + } + if (options.defaults) + object.secondaryHoursType = options.enums === String ? "SECONDARY_HOURS_TYPE_UNSPECIFIED" : 0; + if (message.openNow != null && message.hasOwnProperty("openNow")) { + object.openNow = message.openNow; + if (options.oneofs) + object._openNow = "openNow"; + } + if (message.periods && message.periods.length) { + object.periods = []; + for (var j = 0; j < message.periods.length; ++j) + object.periods[j] = $root.google.maps.places.v1.Place.OpeningHours.Period.toObject(message.periods[j], options); + } + if (message.weekdayDescriptions && message.weekdayDescriptions.length) { + object.weekdayDescriptions = []; + for (var j = 0; j < message.weekdayDescriptions.length; ++j) + object.weekdayDescriptions[j] = message.weekdayDescriptions[j]; + } + if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) + object.secondaryHoursType = options.enums === String ? $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] === undefined ? message.secondaryHoursType : $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] : message.secondaryHoursType; + if (message.specialDays && message.specialDays.length) { + object.specialDays = []; + for (var j = 0; j < message.specialDays.length; ++j) + object.specialDays[j] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.toObject(message.specialDays[j], options); + } + return object; + }; + + /** + * Converts this OpeningHours to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + * @returns {Object.} JSON object + */ + OpeningHours.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpeningHours + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpeningHours.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours"; + }; + + OpeningHours.Period = (function() { + + /** + * Properties of a Period. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface IPeriod + * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [open] Period open + * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [close] Period close + */ + + /** + * Constructs a new Period. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents a Period. + * @implements IPeriod + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set + */ + function Period(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Period open. + * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} open + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + */ + Period.prototype.open = null; + + /** + * Period close. + * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} close + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + */ + Period.prototype.close = null; + + /** + * Creates a new Period instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period instance + */ + Period.create = function create(properties) { + return new Period(properties); + }; + + /** + * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.open != null && Object.hasOwnProperty.call(message, "open")) + $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.open, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.close != null && Object.hasOwnProperty.call(message, "close")) + $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.close, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Period message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); + break; + } + case 2: { + message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Period message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Period.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.open != null && message.hasOwnProperty("open")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.open); + if (error) + return "open." + error; + } + if (message.close != null && message.hasOwnProperty("close")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.close); + if (error) + return "close." + error; + } + return null; + }; + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + */ + Period.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); + if (object.open != null) { + if (typeof object.open !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.open: object expected"); + message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.open); + } + if (object.close != null) { + if (typeof object.close !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.close: object expected"); + message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.close); + } + return message; + }; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period} message Period + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Period.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.open = null; + object.close = null; + } + if (message.open != null && message.hasOwnProperty("open")) + object.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.open, options); + if (message.close != null && message.hasOwnProperty("close")) + object.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.close, options); + return object; + }; + + /** + * Converts this Period to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + * @returns {Object.} JSON object + */ + Period.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Period + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Period.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period"; + }; + + Period.Point = (function() { + + /** + * Properties of a Point. + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @interface IPoint + * @property {number|null} [day] Point day + * @property {number|null} [hour] Point hour + * @property {number|null} [minute] Point minute + * @property {google.type.IDate|null} [date] Point date + * @property {boolean|null} [truncated] Point truncated + */ + + /** + * Constructs a new Point. + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @classdesc Represents a Point. + * @implements IPoint + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set + */ + function Point(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Point day. + * @member {number|null|undefined} day + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.day = null; + + /** + * Point hour. + * @member {number|null|undefined} hour + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.hour = null; + + /** + * Point minute. + * @member {number|null|undefined} minute + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.minute = null; + + /** + * Point date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.date = null; + + /** + * Point truncated. + * @member {boolean} truncated + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.truncated = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Point _day. + * @member {"day"|undefined} _day + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_day", { + get: $util.oneOfGetter($oneOfFields = ["day"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Point _hour. + * @member {"hour"|undefined} _hour + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Point _minute. + * @member {"minute"|undefined} _minute + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Point instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point instance + */ + Point.create = function create(properties) { + return new Point(properties); + }; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hour); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minute); + if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.truncated); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Point message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.day = reader.int32(); + break; + } + case 2: { + message.hour = reader.int32(); + break; + } + case 3: { + message.minute = reader.int32(); + break; + } + case 6: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.truncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Point message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Point.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.day != null && message.hasOwnProperty("day")) { + properties._day = 1; + if (!$util.isInteger(message.day)) + return "day: integer expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (!$util.isInteger(message.hour)) + return "hour: integer expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (!$util.isInteger(message.minute)) + return "minute: integer expected"; + } + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + */ + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period.Point) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); + if (object.day != null) + message.day = object.day | 0; + if (object.hour != null) + message.hour = object.hour | 0; + if (object.minute != null) + message.minute = object.minute | 0; + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.Point.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + if (object.truncated != null) + message.truncated = Boolean(object.truncated); + return message; + }; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.Point} message Point + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Point.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.truncated = false; + object.date = null; + } + if (message.day != null && message.hasOwnProperty("day")) { + object.day = message.day; + if (options.oneofs) + object._day = "day"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + object.truncated = message.truncated; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; + + /** + * Converts this Point to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + * @returns {Object.} JSON object + */ + Point.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period.Point"; + }; + + return Point; + })(); + + return Period; + })(); + + /** + * SecondaryHoursType enum. + * @name google.maps.places.v1.Place.OpeningHours.SecondaryHoursType + * @enum {number} + * @property {number} SECONDARY_HOURS_TYPE_UNSPECIFIED=0 SECONDARY_HOURS_TYPE_UNSPECIFIED value + * @property {number} DRIVE_THROUGH=1 DRIVE_THROUGH value + * @property {number} HAPPY_HOUR=2 HAPPY_HOUR value + * @property {number} DELIVERY=3 DELIVERY value + * @property {number} TAKEOUT=4 TAKEOUT value + * @property {number} KITCHEN=5 KITCHEN value + * @property {number} BREAKFAST=6 BREAKFAST value + * @property {number} LUNCH=7 LUNCH value + * @property {number} DINNER=8 DINNER value + * @property {number} BRUNCH=9 BRUNCH value + * @property {number} PICKUP=10 PICKUP value + * @property {number} ACCESS=11 ACCESS value + * @property {number} SENIOR_HOURS=12 SENIOR_HOURS value + * @property {number} ONLINE_SERVICE_HOURS=13 ONLINE_SERVICE_HOURS value + */ + OpeningHours.SecondaryHoursType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECONDARY_HOURS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRIVE_THROUGH"] = 1; + values[valuesById[2] = "HAPPY_HOUR"] = 2; + values[valuesById[3] = "DELIVERY"] = 3; + values[valuesById[4] = "TAKEOUT"] = 4; + values[valuesById[5] = "KITCHEN"] = 5; + values[valuesById[6] = "BREAKFAST"] = 6; + values[valuesById[7] = "LUNCH"] = 7; + values[valuesById[8] = "DINNER"] = 8; + values[valuesById[9] = "BRUNCH"] = 9; + values[valuesById[10] = "PICKUP"] = 10; + values[valuesById[11] = "ACCESS"] = 11; + values[valuesById[12] = "SENIOR_HOURS"] = 12; + values[valuesById[13] = "ONLINE_SERVICE_HOURS"] = 13; + return values; + })(); + + OpeningHours.SpecialDay = (function() { + + /** + * Properties of a SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface ISpecialDay + * @property {google.type.IDate|null} [date] SpecialDay date + */ + + /** + * Constructs a new SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents a SpecialDay. + * @implements ISpecialDay + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + */ + function SpecialDay(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SpecialDay date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + */ + SpecialDay.prototype.date = null; + + /** + * Creates a new SpecialDay instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay instance + */ + SpecialDay.create = function create(properties) { + return new SpecialDay(properties); + }; + + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpecialDay message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpecialDay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + return null; + }; + + /** + * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + */ + SpecialDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.SpecialDay) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.SpecialDay.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + return message; + }; + + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.SpecialDay} message SpecialDay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpecialDay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.date = null; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; + + /** + * Converts this SpecialDay to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + * @returns {Object.} JSON object + */ + SpecialDay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpecialDay + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpecialDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.SpecialDay"; + }; + + return SpecialDay; + })(); + + return OpeningHours; + })(); + + /** + * BusinessStatus enum. + * @name google.maps.places.v1.Place.BusinessStatus + * @enum {number} + * @property {number} BUSINESS_STATUS_UNSPECIFIED=0 BUSINESS_STATUS_UNSPECIFIED value + * @property {number} OPERATIONAL=1 OPERATIONAL value + * @property {number} CLOSED_TEMPORARILY=2 CLOSED_TEMPORARILY value + * @property {number} CLOSED_PERMANENTLY=3 CLOSED_PERMANENTLY value + */ + Place.BusinessStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BUSINESS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPERATIONAL"] = 1; + values[valuesById[2] = "CLOSED_TEMPORARILY"] = 2; + values[valuesById[3] = "CLOSED_PERMANENTLY"] = 3; + return values; + })(); + + Place.Attribution = (function() { + + /** + * Properties of an Attribution. + * @memberof google.maps.places.v1.Place + * @interface IAttribution + * @property {string|null} [provider] Attribution provider + * @property {string|null} [providerUri] Attribution providerUri + */ + + /** + * Constructs a new Attribution. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an Attribution. + * @implements IAttribution + * @constructor + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + */ + function Attribution(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Attribution provider. + * @member {string} provider + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.provider = ""; + + /** + * Attribution providerUri. + * @member {string} providerUri + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.providerUri = ""; + + /** + * Creates a new Attribution instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.Attribution} Attribution instance + */ + Attribution.create = function create(properties) { + return new Attribution(properties); + }; + + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); + if (message.providerUri != null && Object.hasOwnProperty.call(message, "providerUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerUri); + return writer; + }; + + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attribution message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Attribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.string(); + break; + } + case 2: { + message.providerUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attribution message. + * @function verify + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + if (!$util.isString(message.providerUri)) + return "providerUri: string expected"; + return null; + }; + + /** + * Creates an Attribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.Attribution} Attribution + */ + Attribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.Attribution) + return object; + var message = new $root.google.maps.places.v1.Place.Attribution(); + if (object.provider != null) + message.provider = String(object.provider); + if (object.providerUri != null) + message.providerUri = String(object.providerUri); + return message; + }; + + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.Attribution} message Attribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = ""; + object.providerUri = ""; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + object.providerUri = message.providerUri; + return object; + }; + + /** + * Converts this Attribution to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.Attribution + * @instance + * @returns {Object.} JSON object + */ + Attribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Attribution + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Attribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.Attribution"; + }; + + return Attribution; + })(); + + Place.PaymentOptions = (function() { + + /** + * Properties of a PaymentOptions. + * @memberof google.maps.places.v1.Place + * @interface IPaymentOptions + * @property {boolean|null} [acceptsCreditCards] PaymentOptions acceptsCreditCards + * @property {boolean|null} [acceptsDebitCards] PaymentOptions acceptsDebitCards + * @property {boolean|null} [acceptsCashOnly] PaymentOptions acceptsCashOnly + * @property {boolean|null} [acceptsNfc] PaymentOptions acceptsNfc + */ + + /** + * Constructs a new PaymentOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a PaymentOptions. + * @implements IPaymentOptions + * @constructor + * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set + */ + function PaymentOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PaymentOptions acceptsCreditCards. + * @member {boolean|null|undefined} acceptsCreditCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsCreditCards = null; + + /** + * PaymentOptions acceptsDebitCards. + * @member {boolean|null|undefined} acceptsDebitCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsDebitCards = null; + + /** + * PaymentOptions acceptsCashOnly. + * @member {boolean|null|undefined} acceptsCashOnly + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsCashOnly = null; + + /** + * PaymentOptions acceptsNfc. + * @member {boolean|null|undefined} acceptsNfc + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsNfc = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PaymentOptions _acceptsCreditCards. + * @member {"acceptsCreditCards"|undefined} _acceptsCreditCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsCreditCards", { + get: $util.oneOfGetter($oneOfFields = ["acceptsCreditCards"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PaymentOptions _acceptsDebitCards. + * @member {"acceptsDebitCards"|undefined} _acceptsDebitCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsDebitCards", { + get: $util.oneOfGetter($oneOfFields = ["acceptsDebitCards"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PaymentOptions _acceptsCashOnly. + * @member {"acceptsCashOnly"|undefined} _acceptsCashOnly + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsCashOnly", { + get: $util.oneOfGetter($oneOfFields = ["acceptsCashOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PaymentOptions _acceptsNfc. + * @member {"acceptsNfc"|undefined} _acceptsNfc + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsNfc", { + get: $util.oneOfGetter($oneOfFields = ["acceptsNfc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PaymentOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions instance + */ + PaymentOptions.create = function create(properties) { + return new PaymentOptions(properties); + }; + + /** + * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceptsCreditCards != null && Object.hasOwnProperty.call(message, "acceptsCreditCards")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsCreditCards); + if (message.acceptsDebitCards != null && Object.hasOwnProperty.call(message, "acceptsDebitCards")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.acceptsDebitCards); + if (message.acceptsCashOnly != null && Object.hasOwnProperty.call(message, "acceptsCashOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.acceptsCashOnly); + if (message.acceptsNfc != null && Object.hasOwnProperty.call(message, "acceptsNfc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.acceptsNfc); + return writer; + }; + + /** + * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PaymentOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PaymentOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceptsCreditCards = reader.bool(); + break; + } + case 2: { + message.acceptsDebitCards = reader.bool(); + break; + } + case 3: { + message.acceptsCashOnly = reader.bool(); + break; + } + case 4: { + message.acceptsNfc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PaymentOptions message. + * @function verify + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { + properties._acceptsCreditCards = 1; + if (typeof message.acceptsCreditCards !== "boolean") + return "acceptsCreditCards: boolean expected"; + } + if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { + properties._acceptsDebitCards = 1; + if (typeof message.acceptsDebitCards !== "boolean") + return "acceptsDebitCards: boolean expected"; + } + if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { + properties._acceptsCashOnly = 1; + if (typeof message.acceptsCashOnly !== "boolean") + return "acceptsCashOnly: boolean expected"; + } + if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { + properties._acceptsNfc = 1; + if (typeof message.acceptsNfc !== "boolean") + return "acceptsNfc: boolean expected"; + } + return null; + }; + + /** + * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + */ + PaymentOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.PaymentOptions) + return object; + var message = new $root.google.maps.places.v1.Place.PaymentOptions(); + if (object.acceptsCreditCards != null) + message.acceptsCreditCards = Boolean(object.acceptsCreditCards); + if (object.acceptsDebitCards != null) + message.acceptsDebitCards = Boolean(object.acceptsDebitCards); + if (object.acceptsCashOnly != null) + message.acceptsCashOnly = Boolean(object.acceptsCashOnly); + if (object.acceptsNfc != null) + message.acceptsNfc = Boolean(object.acceptsNfc); + return message; + }; + + /** + * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.PaymentOptions} message PaymentOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { + object.acceptsCreditCards = message.acceptsCreditCards; + if (options.oneofs) + object._acceptsCreditCards = "acceptsCreditCards"; + } + if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { + object.acceptsDebitCards = message.acceptsDebitCards; + if (options.oneofs) + object._acceptsDebitCards = "acceptsDebitCards"; + } + if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { + object.acceptsCashOnly = message.acceptsCashOnly; + if (options.oneofs) + object._acceptsCashOnly = "acceptsCashOnly"; + } + if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { + object.acceptsNfc = message.acceptsNfc; + if (options.oneofs) + object._acceptsNfc = "acceptsNfc"; + } + return object; + }; + + /** + * Converts this PaymentOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + * @returns {Object.} JSON object + */ + PaymentOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PaymentOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.PaymentOptions"; + }; + + return PaymentOptions; + })(); + + Place.ParkingOptions = (function() { + + /** + * Properties of a ParkingOptions. + * @memberof google.maps.places.v1.Place + * @interface IParkingOptions + * @property {boolean|null} [freeParkingLot] ParkingOptions freeParkingLot + * @property {boolean|null} [paidParkingLot] ParkingOptions paidParkingLot + * @property {boolean|null} [freeStreetParking] ParkingOptions freeStreetParking + * @property {boolean|null} [paidStreetParking] ParkingOptions paidStreetParking + * @property {boolean|null} [valetParking] ParkingOptions valetParking + * @property {boolean|null} [freeGarageParking] ParkingOptions freeGarageParking + * @property {boolean|null} [paidGarageParking] ParkingOptions paidGarageParking + */ + + /** + * Constructs a new ParkingOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a ParkingOptions. + * @implements IParkingOptions + * @constructor + * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set + */ + function ParkingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParkingOptions freeParkingLot. + * @member {boolean|null|undefined} freeParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeParkingLot = null; + + /** + * ParkingOptions paidParkingLot. + * @member {boolean|null|undefined} paidParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidParkingLot = null; + + /** + * ParkingOptions freeStreetParking. + * @member {boolean|null|undefined} freeStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeStreetParking = null; + + /** + * ParkingOptions paidStreetParking. + * @member {boolean|null|undefined} paidStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidStreetParking = null; + + /** + * ParkingOptions valetParking. + * @member {boolean|null|undefined} valetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.valetParking = null; + + /** + * ParkingOptions freeGarageParking. + * @member {boolean|null|undefined} freeGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeGarageParking = null; + + /** + * ParkingOptions paidGarageParking. + * @member {boolean|null|undefined} paidGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidGarageParking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ParkingOptions _freeParkingLot. + * @member {"freeParkingLot"|undefined} _freeParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeParkingLot", { + get: $util.oneOfGetter($oneOfFields = ["freeParkingLot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _paidParkingLot. + * @member {"paidParkingLot"|undefined} _paidParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidParkingLot", { + get: $util.oneOfGetter($oneOfFields = ["paidParkingLot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _freeStreetParking. + * @member {"freeStreetParking"|undefined} _freeStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeStreetParking", { + get: $util.oneOfGetter($oneOfFields = ["freeStreetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _paidStreetParking. + * @member {"paidStreetParking"|undefined} _paidStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidStreetParking", { + get: $util.oneOfGetter($oneOfFields = ["paidStreetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _valetParking. + * @member {"valetParking"|undefined} _valetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_valetParking", { + get: $util.oneOfGetter($oneOfFields = ["valetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _freeGarageParking. + * @member {"freeGarageParking"|undefined} _freeGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeGarageParking", { + get: $util.oneOfGetter($oneOfFields = ["freeGarageParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ParkingOptions _paidGarageParking. + * @member {"paidGarageParking"|undefined} _paidGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidGarageParking", { + get: $util.oneOfGetter($oneOfFields = ["paidGarageParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ParkingOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions instance + */ + ParkingOptions.create = function create(properties) { + return new ParkingOptions(properties); + }; + + /** + * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParkingOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.freeParkingLot != null && Object.hasOwnProperty.call(message, "freeParkingLot")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.freeParkingLot); + if (message.paidParkingLot != null && Object.hasOwnProperty.call(message, "paidParkingLot")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paidParkingLot); + if (message.freeStreetParking != null && Object.hasOwnProperty.call(message, "freeStreetParking")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.freeStreetParking); + if (message.paidStreetParking != null && Object.hasOwnProperty.call(message, "paidStreetParking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.paidStreetParking); + if (message.valetParking != null && Object.hasOwnProperty.call(message, "valetParking")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.valetParking); + if (message.freeGarageParking != null && Object.hasOwnProperty.call(message, "freeGarageParking")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.freeGarageParking); + if (message.paidGarageParking != null && Object.hasOwnProperty.call(message, "paidGarageParking")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.paidGarageParking); + return writer; + }; + + /** + * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParkingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParkingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParkingOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ParkingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.freeParkingLot = reader.bool(); + break; + } + case 2: { + message.paidParkingLot = reader.bool(); + break; + } + case 3: { + message.freeStreetParking = reader.bool(); + break; + } + case 4: { + message.paidStreetParking = reader.bool(); + break; + } + case 5: { + message.valetParking = reader.bool(); + break; + } + case 6: { + message.freeGarageParking = reader.bool(); + break; + } + case 7: { + message.paidGarageParking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParkingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParkingOptions message. + * @function verify + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParkingOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { + properties._freeParkingLot = 1; + if (typeof message.freeParkingLot !== "boolean") + return "freeParkingLot: boolean expected"; + } + if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { + properties._paidParkingLot = 1; + if (typeof message.paidParkingLot !== "boolean") + return "paidParkingLot: boolean expected"; + } + if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { + properties._freeStreetParking = 1; + if (typeof message.freeStreetParking !== "boolean") + return "freeStreetParking: boolean expected"; + } + if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { + properties._paidStreetParking = 1; + if (typeof message.paidStreetParking !== "boolean") + return "paidStreetParking: boolean expected"; + } + if (message.valetParking != null && message.hasOwnProperty("valetParking")) { + properties._valetParking = 1; + if (typeof message.valetParking !== "boolean") + return "valetParking: boolean expected"; + } + if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { + properties._freeGarageParking = 1; + if (typeof message.freeGarageParking !== "boolean") + return "freeGarageParking: boolean expected"; + } + if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { + properties._paidGarageParking = 1; + if (typeof message.paidGarageParking !== "boolean") + return "paidGarageParking: boolean expected"; + } + return null; + }; + + /** + * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + */ + ParkingOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.ParkingOptions) + return object; + var message = new $root.google.maps.places.v1.Place.ParkingOptions(); + if (object.freeParkingLot != null) + message.freeParkingLot = Boolean(object.freeParkingLot); + if (object.paidParkingLot != null) + message.paidParkingLot = Boolean(object.paidParkingLot); + if (object.freeStreetParking != null) + message.freeStreetParking = Boolean(object.freeStreetParking); + if (object.paidStreetParking != null) + message.paidStreetParking = Boolean(object.paidStreetParking); + if (object.valetParking != null) + message.valetParking = Boolean(object.valetParking); + if (object.freeGarageParking != null) + message.freeGarageParking = Boolean(object.freeGarageParking); + if (object.paidGarageParking != null) + message.paidGarageParking = Boolean(object.paidGarageParking); + return message; + }; + + /** + * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.ParkingOptions} message ParkingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParkingOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { + object.freeParkingLot = message.freeParkingLot; + if (options.oneofs) + object._freeParkingLot = "freeParkingLot"; + } + if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { + object.paidParkingLot = message.paidParkingLot; + if (options.oneofs) + object._paidParkingLot = "paidParkingLot"; + } + if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { + object.freeStreetParking = message.freeStreetParking; + if (options.oneofs) + object._freeStreetParking = "freeStreetParking"; + } + if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { + object.paidStreetParking = message.paidStreetParking; + if (options.oneofs) + object._paidStreetParking = "paidStreetParking"; + } + if (message.valetParking != null && message.hasOwnProperty("valetParking")) { + object.valetParking = message.valetParking; + if (options.oneofs) + object._valetParking = "valetParking"; + } + if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { + object.freeGarageParking = message.freeGarageParking; + if (options.oneofs) + object._freeGarageParking = "freeGarageParking"; + } + if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { + object.paidGarageParking = message.paidGarageParking; + if (options.oneofs) + object._paidGarageParking = "paidGarageParking"; + } + return object; + }; + + /** + * Converts this ParkingOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + * @returns {Object.} JSON object + */ + ParkingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParkingOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParkingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.ParkingOptions"; + }; + + return ParkingOptions; + })(); + + Place.SubDestination = (function() { + + /** + * Properties of a SubDestination. + * @memberof google.maps.places.v1.Place + * @interface ISubDestination + * @property {string|null} [name] SubDestination name + * @property {string|null} [id] SubDestination id + */ + + /** + * Constructs a new SubDestination. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a SubDestination. + * @implements ISubDestination + * @constructor + * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set + */ + function SubDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubDestination name. + * @member {string} name + * @memberof google.maps.places.v1.Place.SubDestination + * @instance + */ + SubDestination.prototype.name = ""; + + /** + * SubDestination id. + * @member {string} id + * @memberof google.maps.places.v1.Place.SubDestination + * @instance + */ + SubDestination.prototype.id = ""; + + /** + * Creates a new SubDestination instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination instance + */ + SubDestination.create = function create(properties) { + return new SubDestination(properties); + }; + + /** + * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubDestination message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.SubDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubDestination message. + * @function verify + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + */ + SubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.SubDestination) + return object; + var message = new $root.google.maps.places.v1.Place.SubDestination(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a SubDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.SubDestination} message SubDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.id = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this SubDestination to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.SubDestination + * @instance + * @returns {Object.} JSON object + */ + SubDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubDestination + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.SubDestination"; + }; + + return SubDestination; + })(); + + Place.AccessibilityOptions = (function() { + + /** + * Properties of an AccessibilityOptions. + * @memberof google.maps.places.v1.Place + * @interface IAccessibilityOptions + * @property {boolean|null} [wheelchairAccessibleParking] AccessibilityOptions wheelchairAccessibleParking + * @property {boolean|null} [wheelchairAccessibleEntrance] AccessibilityOptions wheelchairAccessibleEntrance + * @property {boolean|null} [wheelchairAccessibleRestroom] AccessibilityOptions wheelchairAccessibleRestroom + * @property {boolean|null} [wheelchairAccessibleSeating] AccessibilityOptions wheelchairAccessibleSeating + */ + + /** + * Constructs a new AccessibilityOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AccessibilityOptions. + * @implements IAccessibilityOptions + * @constructor + * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set + */ + function AccessibilityOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessibilityOptions wheelchairAccessibleParking. + * @member {boolean|null|undefined} wheelchairAccessibleParking + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleParking = null; + + /** + * AccessibilityOptions wheelchairAccessibleEntrance. + * @member {boolean|null|undefined} wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleEntrance = null; + + /** + * AccessibilityOptions wheelchairAccessibleRestroom. + * @member {boolean|null|undefined} wheelchairAccessibleRestroom + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleRestroom = null; + + /** + * AccessibilityOptions wheelchairAccessibleSeating. + * @member {boolean|null|undefined} wheelchairAccessibleSeating + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleSeating = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessibilityOptions _wheelchairAccessibleParking. + * @member {"wheelchairAccessibleParking"|undefined} _wheelchairAccessibleParking + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleParking", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleParking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessibilityOptions _wheelchairAccessibleEntrance. + * @member {"wheelchairAccessibleEntrance"|undefined} _wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleEntrance", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleEntrance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessibilityOptions _wheelchairAccessibleRestroom. + * @member {"wheelchairAccessibleRestroom"|undefined} _wheelchairAccessibleRestroom + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleRestroom", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleRestroom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessibilityOptions _wheelchairAccessibleSeating. + * @member {"wheelchairAccessibleSeating"|undefined} _wheelchairAccessibleSeating + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleSeating", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleSeating"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessibilityOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions instance + */ + AccessibilityOptions.create = function create(properties) { + return new AccessibilityOptions(properties); + }; + + /** + * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessibilityOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.wheelchairAccessibleParking != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleParking")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.wheelchairAccessibleParking); + if (message.wheelchairAccessibleEntrance != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleEntrance")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.wheelchairAccessibleEntrance); + if (message.wheelchairAccessibleRestroom != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleRestroom")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.wheelchairAccessibleRestroom); + if (message.wheelchairAccessibleSeating != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleSeating")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.wheelchairAccessibleSeating); + return writer; + }; + + /** + * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessibilityOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessibilityOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.wheelchairAccessibleParking = reader.bool(); + break; + } + case 2: { + message.wheelchairAccessibleEntrance = reader.bool(); + break; + } + case 3: { + message.wheelchairAccessibleRestroom = reader.bool(); + break; + } + case 4: { + message.wheelchairAccessibleSeating = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessibilityOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessibilityOptions message. + * @function verify + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessibilityOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { + properties._wheelchairAccessibleParking = 1; + if (typeof message.wheelchairAccessibleParking !== "boolean") + return "wheelchairAccessibleParking: boolean expected"; + } + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + properties._wheelchairAccessibleEntrance = 1; + if (typeof message.wheelchairAccessibleEntrance !== "boolean") + return "wheelchairAccessibleEntrance: boolean expected"; + } + if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { + properties._wheelchairAccessibleRestroom = 1; + if (typeof message.wheelchairAccessibleRestroom !== "boolean") + return "wheelchairAccessibleRestroom: boolean expected"; + } + if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { + properties._wheelchairAccessibleSeating = 1; + if (typeof message.wheelchairAccessibleSeating !== "boolean") + return "wheelchairAccessibleSeating: boolean expected"; + } + return null; + }; + + /** + * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions + */ + AccessibilityOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AccessibilityOptions) + return object; + var message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); + if (object.wheelchairAccessibleParking != null) + message.wheelchairAccessibleParking = Boolean(object.wheelchairAccessibleParking); + if (object.wheelchairAccessibleEntrance != null) + message.wheelchairAccessibleEntrance = Boolean(object.wheelchairAccessibleEntrance); + if (object.wheelchairAccessibleRestroom != null) + message.wheelchairAccessibleRestroom = Boolean(object.wheelchairAccessibleRestroom); + if (object.wheelchairAccessibleSeating != null) + message.wheelchairAccessibleSeating = Boolean(object.wheelchairAccessibleSeating); + return message; + }; + + /** + * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {google.maps.places.v1.Place.AccessibilityOptions} message AccessibilityOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessibilityOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { + object.wheelchairAccessibleParking = message.wheelchairAccessibleParking; + if (options.oneofs) + object._wheelchairAccessibleParking = "wheelchairAccessibleParking"; + } + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + object.wheelchairAccessibleEntrance = message.wheelchairAccessibleEntrance; + if (options.oneofs) + object._wheelchairAccessibleEntrance = "wheelchairAccessibleEntrance"; + } + if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { + object.wheelchairAccessibleRestroom = message.wheelchairAccessibleRestroom; + if (options.oneofs) + object._wheelchairAccessibleRestroom = "wheelchairAccessibleRestroom"; + } + if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { + object.wheelchairAccessibleSeating = message.wheelchairAccessibleSeating; + if (options.oneofs) + object._wheelchairAccessibleSeating = "wheelchairAccessibleSeating"; + } + return object; + }; + + /** + * Converts this AccessibilityOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + * @returns {Object.} JSON object + */ + AccessibilityOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessibilityOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessibilityOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AccessibilityOptions"; + }; + + return AccessibilityOptions; + })(); + + Place.GenerativeSummary = (function() { + + /** + * Properties of a GenerativeSummary. + * @memberof google.maps.places.v1.Place + * @interface IGenerativeSummary + * @property {google.type.ILocalizedText|null} [overview] GenerativeSummary overview + * @property {google.type.ILocalizedText|null} [description] GenerativeSummary description + * @property {google.maps.places.v1.IReferences|null} [references] GenerativeSummary references + */ + + /** + * Constructs a new GenerativeSummary. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a GenerativeSummary. + * @implements IGenerativeSummary + * @constructor + * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set + */ + function GenerativeSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerativeSummary overview. + * @member {google.type.ILocalizedText|null|undefined} overview + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @instance + */ + GenerativeSummary.prototype.overview = null; + + /** + * GenerativeSummary description. + * @member {google.type.ILocalizedText|null|undefined} description + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @instance + */ + GenerativeSummary.prototype.description = null; + + /** + * GenerativeSummary references. + * @member {google.maps.places.v1.IReferences|null|undefined} references + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @instance + */ + GenerativeSummary.prototype.references = null; + + /** + * Creates a new GenerativeSummary instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary instance + */ + GenerativeSummary.create = function create(properties) { + return new GenerativeSummary(properties); + }; + + /** + * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerativeSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + $root.google.type.LocalizedText.encode(message.overview, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.google.type.LocalizedText.encode(message.description, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerativeSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerativeSummary message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerativeSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.GenerativeSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.overview = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.description = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 3: { + message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerativeSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerativeSummary message. + * @function verify + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerativeSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.overview != null && message.hasOwnProperty("overview")) { + var error = $root.google.type.LocalizedText.verify(message.overview); + if (error) + return "overview." + error; + } + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.google.type.LocalizedText.verify(message.description); + if (error) + return "description." + error; + } + if (message.references != null && message.hasOwnProperty("references")) { + var error = $root.google.maps.places.v1.References.verify(message.references); + if (error) + return "references." + error; + } + return null; + }; + + /** + * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary + */ + GenerativeSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.GenerativeSummary) + return object; + var message = new $root.google.maps.places.v1.Place.GenerativeSummary(); + if (object.overview != null) { + if (typeof object.overview !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.overview: object expected"); + message.overview = $root.google.type.LocalizedText.fromObject(object.overview); + } + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.description: object expected"); + message.description = $root.google.type.LocalizedText.fromObject(object.description); + } + if (object.references != null) { + if (typeof object.references !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.references: object expected"); + message.references = $root.google.maps.places.v1.References.fromObject(object.references); + } + return message; + }; + + /** + * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {google.maps.places.v1.Place.GenerativeSummary} message GenerativeSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerativeSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.overview = null; + object.description = null; + object.references = null; + } + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = $root.google.type.LocalizedText.toObject(message.overview, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.google.type.LocalizedText.toObject(message.description, options); + if (message.references != null && message.hasOwnProperty("references")) + object.references = $root.google.maps.places.v1.References.toObject(message.references, options); + return object; + }; + + /** + * Converts this GenerativeSummary to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @instance + * @returns {Object.} JSON object + */ + GenerativeSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerativeSummary + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.GenerativeSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerativeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.GenerativeSummary"; + }; + + return GenerativeSummary; + })(); + + Place.AreaSummary = (function() { + + /** + * Properties of an AreaSummary. + * @memberof google.maps.places.v1.Place + * @interface IAreaSummary + * @property {Array.|null} [contentBlocks] AreaSummary contentBlocks + */ + + /** + * Constructs a new AreaSummary. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AreaSummary. + * @implements IAreaSummary + * @constructor + * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set + */ + function AreaSummary(properties) { + this.contentBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AreaSummary contentBlocks. + * @member {Array.} contentBlocks + * @memberof google.maps.places.v1.Place.AreaSummary + * @instance + */ + AreaSummary.prototype.contentBlocks = $util.emptyArray; + + /** + * Creates a new AreaSummary instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary instance + */ + AreaSummary.create = function create(properties) { + return new AreaSummary(properties); + }; + + /** + * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AreaSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentBlocks != null && message.contentBlocks.length) + for (var i = 0; i < message.contentBlocks.length; ++i) + $root.google.maps.places.v1.ContentBlock.encode(message.contentBlocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AreaSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AreaSummary message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AreaSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AreaSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (!(message.contentBlocks && message.contentBlocks.length)) + message.contentBlocks = []; + message.contentBlocks.push($root.google.maps.places.v1.ContentBlock.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AreaSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AreaSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AreaSummary message. + * @function verify + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AreaSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentBlocks != null && message.hasOwnProperty("contentBlocks")) { + if (!Array.isArray(message.contentBlocks)) + return "contentBlocks: array expected"; + for (var i = 0; i < message.contentBlocks.length; ++i) { + var error = $root.google.maps.places.v1.ContentBlock.verify(message.contentBlocks[i]); + if (error) + return "contentBlocks." + error; + } + } + return null; + }; + + /** + * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + */ + AreaSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AreaSummary) + return object; + var message = new $root.google.maps.places.v1.Place.AreaSummary(); + if (object.contentBlocks) { + if (!Array.isArray(object.contentBlocks)) + throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: array expected"); + message.contentBlocks = []; + for (var i = 0; i < object.contentBlocks.length; ++i) { + if (typeof object.contentBlocks[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: object expected"); + message.contentBlocks[i] = $root.google.maps.places.v1.ContentBlock.fromObject(object.contentBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.AreaSummary} message AreaSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AreaSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contentBlocks = []; + if (message.contentBlocks && message.contentBlocks.length) { + object.contentBlocks = []; + for (var j = 0; j < message.contentBlocks.length; ++j) + object.contentBlocks[j] = $root.google.maps.places.v1.ContentBlock.toObject(message.contentBlocks[j], options); + } + return object; + }; + + /** + * Converts this AreaSummary to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AreaSummary + * @instance + * @returns {Object.} JSON object + */ + AreaSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AreaSummary + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AreaSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AreaSummary"; + }; + + return AreaSummary; + })(); + + return Place; + })(); + + /** + * PriceLevel enum. + * @name google.maps.places.v1.PriceLevel + * @enum {number} + * @property {number} PRICE_LEVEL_UNSPECIFIED=0 PRICE_LEVEL_UNSPECIFIED value + * @property {number} PRICE_LEVEL_FREE=1 PRICE_LEVEL_FREE value + * @property {number} PRICE_LEVEL_INEXPENSIVE=2 PRICE_LEVEL_INEXPENSIVE value + * @property {number} PRICE_LEVEL_MODERATE=3 PRICE_LEVEL_MODERATE value + * @property {number} PRICE_LEVEL_EXPENSIVE=4 PRICE_LEVEL_EXPENSIVE value + * @property {number} PRICE_LEVEL_VERY_EXPENSIVE=5 PRICE_LEVEL_VERY_EXPENSIVE value + */ + v1.PriceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRICE_LEVEL_FREE"] = 1; + values[valuesById[2] = "PRICE_LEVEL_INEXPENSIVE"] = 2; + values[valuesById[3] = "PRICE_LEVEL_MODERATE"] = 3; + values[valuesById[4] = "PRICE_LEVEL_EXPENSIVE"] = 4; + values[valuesById[5] = "PRICE_LEVEL_VERY_EXPENSIVE"] = 5; + return values; + })(); + + v1.Places = (function() { + + /** + * Constructs a new Places service. + * @memberof google.maps.places.v1 + * @classdesc Represents a Places + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Places(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Places.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Places; + + /** + * Creates new Places service using the specified rpc implementation. + * @function create + * @memberof google.maps.places.v1.Places + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Places} RPC service. Useful where requests and/or responses are streamed. + */ + Places.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. + * @memberof google.maps.places.v1.Places + * @typedef SearchNearbyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.SearchNearbyResponse} [response] SearchNearbyResponse + */ + + /** + * Calls SearchNearby. + * @function searchNearby + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object + * @param {google.maps.places.v1.Places.SearchNearbyCallback} callback Node-style callback called with the error, if any, and SearchNearbyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.searchNearby = function searchNearby(request, callback) { + return this.rpcCall(searchNearby, $root.google.maps.places.v1.SearchNearbyRequest, $root.google.maps.places.v1.SearchNearbyResponse, request, callback); + }, "name", { value: "SearchNearby" }); + + /** + * Calls SearchNearby. + * @function searchNearby + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @memberof google.maps.places.v1.Places + * @typedef SearchTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.SearchTextResponse} [response] SearchTextResponse + */ + + /** + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @param {google.maps.places.v1.Places.SearchTextCallback} callback Node-style callback called with the error, if any, and SearchTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.searchText = function searchText(request, callback) { + return this.rpcCall(searchText, $root.google.maps.places.v1.SearchTextRequest, $root.google.maps.places.v1.SearchTextResponse, request, callback); + }, "name", { value: "SearchText" }); + + /** + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. + * @memberof google.maps.places.v1.Places + * @typedef GetPhotoMediaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.PhotoMedia} [response] PhotoMedia + */ + + /** + * Calls GetPhotoMedia. + * @function getPhotoMedia + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object + * @param {google.maps.places.v1.Places.GetPhotoMediaCallback} callback Node-style callback called with the error, if any, and PhotoMedia + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.getPhotoMedia = function getPhotoMedia(request, callback) { + return this.rpcCall(getPhotoMedia, $root.google.maps.places.v1.GetPhotoMediaRequest, $root.google.maps.places.v1.PhotoMedia, request, callback); + }, "name", { value: "GetPhotoMedia" }); + + /** + * Calls GetPhotoMedia. + * @function getPhotoMedia + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.maps.places.v1.Places|getPlace}. + * @memberof google.maps.places.v1.Places + * @typedef GetPlaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.Place} [response] Place + */ + + /** + * Calls GetPlace. + * @function getPlace + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object + * @param {google.maps.places.v1.Places.GetPlaceCallback} callback Node-style callback called with the error, if any, and Place + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.getPlace = function getPlace(request, callback) { + return this.rpcCall(getPlace, $root.google.maps.places.v1.GetPlaceRequest, $root.google.maps.places.v1.Place, request, callback); + }, "name", { value: "GetPlace" }); + + /** + * Calls GetPlace. + * @function getPlace + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. + * @memberof google.maps.places.v1.Places + * @typedef AutocompletePlacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.AutocompletePlacesResponse} [response] AutocompletePlacesResponse + */ + + /** + * Calls AutocompletePlaces. + * @function autocompletePlaces + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object + * @param {google.maps.places.v1.Places.AutocompletePlacesCallback} callback Node-style callback called with the error, if any, and AutocompletePlacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.autocompletePlaces = function autocompletePlaces(request, callback) { + return this.rpcCall(autocompletePlaces, $root.google.maps.places.v1.AutocompletePlacesRequest, $root.google.maps.places.v1.AutocompletePlacesResponse, request, callback); + }, "name", { value: "AutocompletePlaces" }); + + /** + * Calls AutocompletePlaces. + * @function autocompletePlaces + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Places; + })(); + + v1.SearchNearbyRequest = (function() { + + /** + * Properties of a SearchNearbyRequest. + * @memberof google.maps.places.v1 + * @interface ISearchNearbyRequest + * @property {string|null} [languageCode] SearchNearbyRequest languageCode + * @property {string|null} [regionCode] SearchNearbyRequest regionCode + * @property {Array.|null} [includedTypes] SearchNearbyRequest includedTypes + * @property {Array.|null} [excludedTypes] SearchNearbyRequest excludedTypes + * @property {Array.|null} [includedPrimaryTypes] SearchNearbyRequest includedPrimaryTypes + * @property {Array.|null} [excludedPrimaryTypes] SearchNearbyRequest excludedPrimaryTypes + * @property {number|null} [maxResultCount] SearchNearbyRequest maxResultCount + * @property {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null} [locationRestriction] SearchNearbyRequest locationRestriction + * @property {google.maps.places.v1.SearchNearbyRequest.RankPreference|null} [rankPreference] SearchNearbyRequest rankPreference + */ + + /** + * Constructs a new SearchNearbyRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchNearbyRequest. + * @implements ISearchNearbyRequest + * @constructor + * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set + */ + function SearchNearbyRequest(properties) { + this.includedTypes = []; + this.excludedTypes = []; + this.includedPrimaryTypes = []; + this.excludedPrimaryTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchNearbyRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.languageCode = ""; + + /** + * SearchNearbyRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.regionCode = ""; + + /** + * SearchNearbyRequest includedTypes. + * @member {Array.} includedTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.includedTypes = $util.emptyArray; + + /** + * SearchNearbyRequest excludedTypes. + * @member {Array.} excludedTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.excludedTypes = $util.emptyArray; + + /** + * SearchNearbyRequest includedPrimaryTypes. + * @member {Array.} includedPrimaryTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.includedPrimaryTypes = $util.emptyArray; + + /** + * SearchNearbyRequest excludedPrimaryTypes. + * @member {Array.} excludedPrimaryTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.excludedPrimaryTypes = $util.emptyArray; + + /** + * SearchNearbyRequest maxResultCount. + * @member {number} maxResultCount + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.maxResultCount = 0; + + /** + * SearchNearbyRequest locationRestriction. + * @member {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.locationRestriction = null; + + /** + * SearchNearbyRequest rankPreference. + * @member {google.maps.places.v1.SearchNearbyRequest.RankPreference} rankPreference + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.rankPreference = 0; + + /** + * Creates a new SearchNearbyRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest instance + */ + SearchNearbyRequest.create = function create(properties) { + return new SearchNearbyRequest(properties); + }; + + /** + * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchNearbyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); + if (message.includedTypes != null && message.includedTypes.length) + for (var i = 0; i < message.includedTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.includedTypes[i]); + if (message.excludedTypes != null && message.excludedTypes.length) + for (var i = 0; i < message.excludedTypes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedTypes[i]); + if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedPrimaryTypes[i]); + if (message.excludedPrimaryTypes != null && message.excludedPrimaryTypes.length) + for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedPrimaryTypes[i]); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxResultCount); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rankPreference); + return writer; + }; + + /** + * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchNearbyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchNearbyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.languageCode = reader.string(); + break; + } + case 2: { + message.regionCode = reader.string(); + break; + } + case 3: { + if (!(message.includedTypes && message.includedTypes.length)) + message.includedTypes = []; + message.includedTypes.push(reader.string()); + break; + } + case 4: { + if (!(message.excludedTypes && message.excludedTypes.length)) + message.excludedTypes = []; + message.excludedTypes.push(reader.string()); + break; + } + case 5: { + if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) + message.includedPrimaryTypes = []; + message.includedPrimaryTypes.push(reader.string()); + break; + } + case 6: { + if (!(message.excludedPrimaryTypes && message.excludedPrimaryTypes.length)) + message.excludedPrimaryTypes = []; + message.excludedPrimaryTypes.push(reader.string()); + break; + } + case 7: { + message.maxResultCount = reader.int32(); + break; + } + case 8: { + message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 9: { + message.rankPreference = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchNearbyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchNearbyRequest message. + * @function verify + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchNearbyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.includedTypes != null && message.hasOwnProperty("includedTypes")) { + if (!Array.isArray(message.includedTypes)) + return "includedTypes: array expected"; + for (var i = 0; i < message.includedTypes.length; ++i) + if (!$util.isString(message.includedTypes[i])) + return "includedTypes: string[] expected"; + } + if (message.excludedTypes != null && message.hasOwnProperty("excludedTypes")) { + if (!Array.isArray(message.excludedTypes)) + return "excludedTypes: array expected"; + for (var i = 0; i < message.excludedTypes.length; ++i) + if (!$util.isString(message.excludedTypes[i])) + return "excludedTypes: string[] expected"; + } + if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { + if (!Array.isArray(message.includedPrimaryTypes)) + return "includedPrimaryTypes: array expected"; + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + if (!$util.isString(message.includedPrimaryTypes[i])) + return "includedPrimaryTypes: string[] expected"; + } + if (message.excludedPrimaryTypes != null && message.hasOwnProperty("excludedPrimaryTypes")) { + if (!Array.isArray(message.excludedPrimaryTypes)) + return "excludedPrimaryTypes: array expected"; + for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) + if (!$util.isString(message.excludedPrimaryTypes[i])) + return "excludedPrimaryTypes: string[] expected"; + } + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + switch (message.rankPreference) { + default: + return "rankPreference: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest + */ + SearchNearbyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest) + return object; + var message = new $root.google.maps.places.v1.SearchNearbyRequest(); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.includedTypes) { + if (!Array.isArray(object.includedTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedTypes: array expected"); + message.includedTypes = []; + for (var i = 0; i < object.includedTypes.length; ++i) + message.includedTypes[i] = String(object.includedTypes[i]); + } + if (object.excludedTypes) { + if (!Array.isArray(object.excludedTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedTypes: array expected"); + message.excludedTypes = []; + for (var i = 0; i < object.excludedTypes.length; ++i) + message.excludedTypes[i] = String(object.excludedTypes[i]); + } + if (object.includedPrimaryTypes) { + if (!Array.isArray(object.includedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedPrimaryTypes: array expected"); + message.includedPrimaryTypes = []; + for (var i = 0; i < object.includedPrimaryTypes.length; ++i) + message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); + } + if (object.excludedPrimaryTypes) { + if (!Array.isArray(object.excludedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedPrimaryTypes: array expected"); + message.excludedPrimaryTypes = []; + for (var i = 0; i < object.excludedPrimaryTypes.length; ++i) + message.excludedPrimaryTypes[i] = String(object.excludedPrimaryTypes[i]); + } + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.fromObject(object.locationRestriction); + } + switch (object.rankPreference) { + default: + if (typeof object.rankPreference === "number") { + message.rankPreference = object.rankPreference; + break; + } + break; + case "RANK_PREFERENCE_UNSPECIFIED": + case 0: + message.rankPreference = 0; + break; + case "DISTANCE": + case 1: + message.rankPreference = 1; + break; + case "POPULARITY": + case 2: + message.rankPreference = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {google.maps.places.v1.SearchNearbyRequest} message SearchNearbyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchNearbyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedTypes = []; + object.excludedTypes = []; + object.includedPrimaryTypes = []; + object.excludedPrimaryTypes = []; + } + if (options.defaults) { + object.languageCode = ""; + object.regionCode = ""; + object.maxResultCount = 0; + object.locationRestriction = null; + object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.includedTypes && message.includedTypes.length) { + object.includedTypes = []; + for (var j = 0; j < message.includedTypes.length; ++j) + object.includedTypes[j] = message.includedTypes[j]; + } + if (message.excludedTypes && message.excludedTypes.length) { + object.excludedTypes = []; + for (var j = 0; j < message.excludedTypes.length; ++j) + object.excludedTypes[j] = message.excludedTypes[j]; + } + if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { + object.includedPrimaryTypes = []; + for (var j = 0; j < message.includedPrimaryTypes.length; ++j) + object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; + } + if (message.excludedPrimaryTypes && message.excludedPrimaryTypes.length) { + object.excludedPrimaryTypes = []; + for (var j = 0; j < message.excludedPrimaryTypes.length; ++j) + object.excludedPrimaryTypes[j] = message.excludedPrimaryTypes[j]; + } + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] : message.rankPreference; + return object; + }; + + /** + * Converts this SearchNearbyRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + * @returns {Object.} JSON object + */ + SearchNearbyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchNearbyRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchNearbyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchNearbyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest"; + }; + + SearchNearbyRequest.LocationRestriction = (function() { + + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.SearchNearbyRequest + * @interface ILocationRestriction + * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle + */ + + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.SearchNearbyRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationRestriction circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"circle"|undefined} type + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.circle != null && message.hasOwnProperty("circle")) { + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.LocationRestriction.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + /** + * RankPreference enum. + * @name google.maps.places.v1.SearchNearbyRequest.RankPreference + * @enum {number} + * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value + * @property {number} DISTANCE=1 DISTANCE value + * @property {number} POPULARITY=2 POPULARITY value + */ + SearchNearbyRequest.RankPreference = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISTANCE"] = 1; + values[valuesById[2] = "POPULARITY"] = 2; + return values; + })(); + + return SearchNearbyRequest; + })(); + + v1.SearchNearbyResponse = (function() { + + /** + * Properties of a SearchNearbyResponse. + * @memberof google.maps.places.v1 + * @interface ISearchNearbyResponse + * @property {Array.|null} [places] SearchNearbyResponse places + */ + + /** + * Constructs a new SearchNearbyResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchNearbyResponse. + * @implements ISearchNearbyResponse + * @constructor + * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set + */ + function SearchNearbyResponse(properties) { + this.places = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchNearbyResponse places. + * @member {Array.} places + * @memberof google.maps.places.v1.SearchNearbyResponse + * @instance + */ + SearchNearbyResponse.prototype.places = $util.emptyArray; + + /** + * Creates a new SearchNearbyResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse instance + */ + SearchNearbyResponse.create = function create(properties) { + return new SearchNearbyResponse(properties); + }; + + /** + * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchNearbyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchNearbyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchNearbyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchNearbyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchNearbyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchNearbyResponse message. + * @function verify + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchNearbyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) { + var error = $root.google.maps.places.v1.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse + */ + SearchNearbyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyResponse) + return object; + var message = new $root.google.maps.places.v1.SearchNearbyResponse(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: object expected"); + message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.SearchNearbyResponse} message SearchNearbyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchNearbyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this SearchNearbyResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchNearbyResponse + * @instance + * @returns {Object.} JSON object + */ + SearchNearbyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchNearbyResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchNearbyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyResponse"; + }; + + return SearchNearbyResponse; + })(); + + v1.SearchTextRequest = (function() { + + /** + * Properties of a SearchTextRequest. + * @memberof google.maps.places.v1 + * @interface ISearchTextRequest + * @property {string|null} [textQuery] SearchTextRequest textQuery + * @property {string|null} [languageCode] SearchTextRequest languageCode + * @property {string|null} [regionCode] SearchTextRequest regionCode + * @property {google.maps.places.v1.SearchTextRequest.RankPreference|null} [rankPreference] SearchTextRequest rankPreference + * @property {string|null} [includedType] SearchTextRequest includedType + * @property {boolean|null} [openNow] SearchTextRequest openNow + * @property {number|null} [minRating] SearchTextRequest minRating + * @property {number|null} [maxResultCount] SearchTextRequest maxResultCount + * @property {Array.|null} [priceLevels] SearchTextRequest priceLevels + * @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering + * @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias + * @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction + * @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions + */ + + /** + * Constructs a new SearchTextRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextRequest. + * @implements ISearchTextRequest + * @constructor + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set + */ + function SearchTextRequest(properties) { + this.priceLevels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchTextRequest textQuery. + * @member {string} textQuery + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.textQuery = ""; + + /** + * SearchTextRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.languageCode = ""; + + /** + * SearchTextRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.regionCode = ""; + + /** + * SearchTextRequest rankPreference. + * @member {google.maps.places.v1.SearchTextRequest.RankPreference} rankPreference + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.rankPreference = 0; + + /** + * SearchTextRequest includedType. + * @member {string} includedType + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.includedType = ""; + + /** + * SearchTextRequest openNow. + * @member {boolean} openNow + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.openNow = false; + + /** + * SearchTextRequest minRating. + * @member {number} minRating + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.minRating = 0; + + /** + * SearchTextRequest maxResultCount. + * @member {number} maxResultCount + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.maxResultCount = 0; + + /** + * SearchTextRequest priceLevels. + * @member {Array.} priceLevels + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.priceLevels = $util.emptyArray; + + /** + * SearchTextRequest strictTypeFiltering. + * @member {boolean} strictTypeFiltering + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.strictTypeFiltering = false; + + /** + * SearchTextRequest locationBias. + * @member {google.maps.places.v1.SearchTextRequest.ILocationBias|null|undefined} locationBias + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.locationBias = null; + + /** + * SearchTextRequest locationRestriction. + * @member {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.locationRestriction = null; + + /** + * SearchTextRequest evOptions. + * @member {google.maps.places.v1.SearchTextRequest.IEVOptions|null|undefined} evOptions + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.evOptions = null; + + /** + * Creates a new SearchTextRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest instance + */ + SearchTextRequest.create = function create(properties) { + return new SearchTextRequest(properties); + }; + + /** + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textQuery != null && Object.hasOwnProperty.call(message, "textQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textQuery); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rankPreference); + if (message.includedType != null && Object.hasOwnProperty.call(message, "includedType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.includedType); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.openNow); + if (message.minRating != null && Object.hasOwnProperty.call(message, "minRating")) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.minRating); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxResultCount); + if (message.priceLevels != null && message.priceLevels.length) { + writer.uint32(/* id 11, wireType 2 =*/90).fork(); + for (var i = 0; i < message.priceLevels.length; ++i) + writer.int32(message.priceLevels[i]); + writer.ldelim(); + } + if (message.strictTypeFiltering != null && Object.hasOwnProperty.call(message, "strictTypeFiltering")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.strictTypeFiltering); + if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) + $root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions")) + $root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.textQuery = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.rankPreference = reader.int32(); + break; + } + case 6: { + message.includedType = reader.string(); + break; + } + case 7: { + message.openNow = reader.bool(); + break; + } + case 9: { + message.minRating = reader.double(); + break; + } + case 10: { + message.maxResultCount = reader.int32(); + break; + } + case 11: { + if (!(message.priceLevels && message.priceLevels.length)) + message.priceLevels = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.priceLevels.push(reader.int32()); + } else + message.priceLevels.push(reader.int32()); + break; + } + case 12: { + message.strictTypeFiltering = reader.bool(); + break; + } + case 13: { + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.decode(reader, reader.uint32()); + break; + } + case 14: { + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 15: { + message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchTextRequest message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + if (!$util.isString(message.textQuery)) + return "textQuery: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + switch (message.rankPreference) { + default: + return "rankPreference: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.includedType != null && message.hasOwnProperty("includedType")) + if (!$util.isString(message.includedType)) + return "includedType: string expected"; + if (message.openNow != null && message.hasOwnProperty("openNow")) + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; + if (message.minRating != null && message.hasOwnProperty("minRating")) + if (typeof message.minRating !== "number") + return "minRating: number expected"; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + if (message.priceLevels != null && message.hasOwnProperty("priceLevels")) { + if (!Array.isArray(message.priceLevels)) + return "priceLevels: array expected"; + for (var i = 0; i < message.priceLevels.length; ++i) + switch (message.priceLevels[i]) { + default: + return "priceLevels: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + if (typeof message.strictTypeFiltering !== "boolean") + return "strictTypeFiltering: boolean expected"; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationBias.verify(message.locationBias); + if (error) + return "locationBias." + error; + } + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + if (message.evOptions != null && message.hasOwnProperty("evOptions")) { + var error = $root.google.maps.places.v1.SearchTextRequest.EVOptions.verify(message.evOptions); + if (error) + return "evOptions." + error; + } + return null; + }; + + /** + * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + */ + SearchTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest(); + if (object.textQuery != null) + message.textQuery = String(object.textQuery); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + switch (object.rankPreference) { + default: + if (typeof object.rankPreference === "number") { + message.rankPreference = object.rankPreference; + break; + } + break; + case "RANK_PREFERENCE_UNSPECIFIED": + case 0: + message.rankPreference = 0; + break; + case "DISTANCE": + case 1: + message.rankPreference = 1; + break; + case "RELEVANCE": + case 2: + message.rankPreference = 2; + break; + } + if (object.includedType != null) + message.includedType = String(object.includedType); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.minRating != null) + message.minRating = Number(object.minRating); + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + if (object.priceLevels) { + if (!Array.isArray(object.priceLevels)) + throw TypeError(".google.maps.places.v1.SearchTextRequest.priceLevels: array expected"); + message.priceLevels = []; + for (var i = 0; i < object.priceLevels.length; ++i) + switch (object.priceLevels[i]) { + default: + if (typeof object.priceLevels[i] === "number") { + message.priceLevels[i] = object.priceLevels[i]; + break; + } + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevels[i] = 0; + break; + case "PRICE_LEVEL_FREE": + case 1: + message.priceLevels[i] = 1; + break; + case "PRICE_LEVEL_INEXPENSIVE": + case 2: + message.priceLevels[i] = 2; + break; + case "PRICE_LEVEL_MODERATE": + case 3: + message.priceLevels[i] = 3; + break; + case "PRICE_LEVEL_EXPENSIVE": + case 4: + message.priceLevels[i] = 4; + break; + case "PRICE_LEVEL_VERY_EXPENSIVE": + case 5: + message.priceLevels[i] = 5; + break; + } + } + if (object.strictTypeFiltering != null) + message.strictTypeFiltering = Boolean(object.strictTypeFiltering); + if (object.locationBias != null) { + if (typeof object.locationBias !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationBias: object expected"); + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.fromObject(object.locationBias); + } + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction); + } + if (object.evOptions != null) { + if (typeof object.evOptions !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected"); + message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions); + } + return message; + }; + + /** + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.SearchTextRequest} message SearchTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.priceLevels = []; + if (options.defaults) { + object.textQuery = ""; + object.languageCode = ""; + object.regionCode = ""; + object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; + object.includedType = ""; + object.openNow = false; + object.minRating = 0; + object.maxResultCount = 0; + object.strictTypeFiltering = false; + object.locationBias = null; + object.locationRestriction = null; + object.evOptions = null; + } + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + object.textQuery = message.textQuery; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] : message.rankPreference; + if (message.includedType != null && message.hasOwnProperty("includedType")) + object.includedType = message.includedType; + if (message.openNow != null && message.hasOwnProperty("openNow")) + object.openNow = message.openNow; + if (message.minRating != null && message.hasOwnProperty("minRating")) + object.minRating = options.json && !isFinite(message.minRating) ? String(message.minRating) : message.minRating; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + if (message.priceLevels && message.priceLevels.length) { + object.priceLevels = []; + for (var j = 0; j < message.priceLevels.length; ++j) + object.priceLevels[j] = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] === undefined ? message.priceLevels[j] : $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] : message.priceLevels[j]; + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + object.strictTypeFiltering = message.strictTypeFiltering; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) + object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options); + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.evOptions != null && message.hasOwnProperty("evOptions")) + object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options); + return object; + }; + + /** + * Converts this SearchTextRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + * @returns {Object.} JSON object + */ + SearchTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchTextRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest"; + }; + + /** + * RankPreference enum. + * @name google.maps.places.v1.SearchTextRequest.RankPreference + * @enum {number} + * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value + * @property {number} DISTANCE=1 DISTANCE value + * @property {number} RELEVANCE=2 RELEVANCE value + */ + SearchTextRequest.RankPreference = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISTANCE"] = 1; + values[valuesById[2] = "RELEVANCE"] = 2; + return values; + })(); + + SearchTextRequest.LocationBias = (function() { + + /** + * Properties of a LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationBias + * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle + */ + + /** + * Constructs a new LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationBias. + * @implements ILocationBias + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + */ + function LocationBias(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationBias rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.rectangle = null; + + /** + * LocationBias circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationBias type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + Object.defineProperty(LocationBias.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationBias instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias instance + */ + LocationBias.create = function create(properties) { + return new LocationBias(properties); + }; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationBias message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationBias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + */ + LocationBias.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationBias) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationBias} message LocationBias + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationBias.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationBias to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + * @returns {Object.} JSON object + */ + LocationBias.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationBias + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationBias"; + }; + + return LocationBias; + })(); + + SearchTextRequest.LocationRestriction = (function() { + + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationRestriction + * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle + */ + + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationRestriction rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.rectangle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"rectangle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationRestriction.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + SearchTextRequest.EVOptions = (function() { + + /** + * Properties of a EVOptions. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface IEVOptions + * @property {number|null} [minimumChargingRateKw] EVOptions minimumChargingRateKw + * @property {Array.|null} [connectorTypes] EVOptions connectorTypes + */ + + /** + * Constructs a new EVOptions. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a EVOptions. + * @implements IEVOptions + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set + */ + function EVOptions(properties) { + this.connectorTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EVOptions minimumChargingRateKw. + * @member {number} minimumChargingRateKw + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + */ + EVOptions.prototype.minimumChargingRateKw = 0; + + /** + * EVOptions connectorTypes. + * @member {Array.} connectorTypes + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + */ + EVOptions.prototype.connectorTypes = $util.emptyArray; + + /** + * Creates a new EVOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions instance + */ + EVOptions.create = function create(properties) { + return new EVOptions(properties); + }; + + /** + * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimumChargingRateKw != null && Object.hasOwnProperty.call(message, "minimumChargingRateKw")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimumChargingRateKw); + if (message.connectorTypes != null && message.connectorTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.connectorTypes.length; ++i) + writer.int32(message.connectorTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a EVOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimumChargingRateKw = reader.double(); + break; + } + case 2: { + if (!(message.connectorTypes && message.connectorTypes.length)) + message.connectorTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.connectorTypes.push(reader.int32()); + } else + message.connectorTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a EVOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a EVOptions message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EVOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) + if (typeof message.minimumChargingRateKw !== "number") + return "minimumChargingRateKw: number expected"; + if (message.connectorTypes != null && message.hasOwnProperty("connectorTypes")) { + if (!Array.isArray(message.connectorTypes)) + return "connectorTypes: array expected"; + for (var i = 0; i < message.connectorTypes.length; ++i) + switch (message.connectorTypes[i]) { + default: + return "connectorTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + return null; + }; + + /** + * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + */ + EVOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.EVOptions) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); + if (object.minimumChargingRateKw != null) + message.minimumChargingRateKw = Number(object.minimumChargingRateKw); + if (object.connectorTypes) { + if (!Array.isArray(object.connectorTypes)) + throw TypeError(".google.maps.places.v1.SearchTextRequest.EVOptions.connectorTypes: array expected"); + message.connectorTypes = []; + for (var i = 0; i < object.connectorTypes.length; ++i) + switch (object.connectorTypes[i]) { + default: + if (typeof object.connectorTypes[i] === "number") { + message.connectorTypes[i] = object.connectorTypes[i]; + break; + } + case "EV_CONNECTOR_TYPE_UNSPECIFIED": + case 0: + message.connectorTypes[i] = 0; + break; + case "EV_CONNECTOR_TYPE_OTHER": + case 1: + message.connectorTypes[i] = 1; + break; + case "EV_CONNECTOR_TYPE_J1772": + case 2: + message.connectorTypes[i] = 2; + break; + case "EV_CONNECTOR_TYPE_TYPE_2": + case 3: + message.connectorTypes[i] = 3; + break; + case "EV_CONNECTOR_TYPE_CHADEMO": + case 4: + message.connectorTypes[i] = 4; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_1": + case 5: + message.connectorTypes[i] = 5; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_2": + case 6: + message.connectorTypes[i] = 6; + break; + case "EV_CONNECTOR_TYPE_TESLA": + case 7: + message.connectorTypes[i] = 7; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": + case 8: + message.connectorTypes[i] = 8; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": + case 9: + message.connectorTypes[i] = 9; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a EVOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.EVOptions} message EVOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EVOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectorTypes = []; + if (options.defaults) + object.minimumChargingRateKw = 0; + if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) + object.minimumChargingRateKw = options.json && !isFinite(message.minimumChargingRateKw) ? String(message.minimumChargingRateKw) : message.minimumChargingRateKw; + if (message.connectorTypes && message.connectorTypes.length) { + object.connectorTypes = []; + for (var j = 0; j < message.connectorTypes.length; ++j) + object.connectorTypes[j] = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] === undefined ? message.connectorTypes[j] : $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] : message.connectorTypes[j]; + } + return object; + }; + + /** + * Converts this EVOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + * @returns {Object.} JSON object + */ + EVOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EVOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.EVOptions"; + }; + + return EVOptions; + })(); + + return SearchTextRequest; + })(); + + v1.SearchTextResponse = (function() { + + /** + * Properties of a SearchTextResponse. + * @memberof google.maps.places.v1 + * @interface ISearchTextResponse + * @property {Array.|null} [places] SearchTextResponse places + * @property {Array.|null} [contextualContents] SearchTextResponse contextualContents + */ + + /** + * Constructs a new SearchTextResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextResponse. + * @implements ISearchTextResponse + * @constructor + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + */ + function SearchTextResponse(properties) { + this.places = []; + this.contextualContents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchTextResponse places. + * @member {Array.} places + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + */ + SearchTextResponse.prototype.places = $util.emptyArray; + + /** + * SearchTextResponse contextualContents. + * @member {Array.} contextualContents + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + */ + SearchTextResponse.prototype.contextualContents = $util.emptyArray; + + /** + * Creates a new SearchTextResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse instance + */ + SearchTextResponse.create = function create(properties) { + return new SearchTextResponse(properties); + }; + + /** + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contextualContents != null && message.contextualContents.length) + for (var i = 0; i < message.contextualContents.length; ++i) + $root.google.maps.places.v1.ContextualContent.encode(message.contextualContents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.contextualContents && message.contextualContents.length)) + message.contextualContents = []; + message.contextualContents.push($root.google.maps.places.v1.ContextualContent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchTextResponse message. + * @function verify + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) { + var error = $root.google.maps.places.v1.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + if (message.contextualContents != null && message.hasOwnProperty("contextualContents")) { + if (!Array.isArray(message.contextualContents)) + return "contextualContents: array expected"; + for (var i = 0; i < message.contextualContents.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.verify(message.contextualContents[i]); + if (error) + return "contextualContents." + error; + } + } + return null; + }; + + /** + * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + */ + SearchTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextResponse) + return object; + var message = new $root.google.maps.places.v1.SearchTextResponse(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: object expected"); + message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); + } + } + if (object.contextualContents) { + if (!Array.isArray(object.contextualContents)) + throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: array expected"); + message.contextualContents = []; + for (var i = 0; i < object.contextualContents.length; ++i) { + if (typeof object.contextualContents[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: object expected"); + message.contextualContents[i] = $root.google.maps.places.v1.ContextualContent.fromObject(object.contextualContents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.SearchTextResponse} message SearchTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.places = []; + object.contextualContents = []; + } + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); + } + if (message.contextualContents && message.contextualContents.length) { + object.contextualContents = []; + for (var j = 0; j < message.contextualContents.length; ++j) + object.contextualContents[j] = $root.google.maps.places.v1.ContextualContent.toObject(message.contextualContents[j], options); + } + return object; + }; + + /** + * Converts this SearchTextResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + * @returns {Object.} JSON object + */ + SearchTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchTextResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextResponse"; + }; + + return SearchTextResponse; + })(); + + v1.GetPhotoMediaRequest = (function() { + + /** + * Properties of a GetPhotoMediaRequest. + * @memberof google.maps.places.v1 + * @interface IGetPhotoMediaRequest + * @property {string|null} [name] GetPhotoMediaRequest name + * @property {number|null} [maxWidthPx] GetPhotoMediaRequest maxWidthPx + * @property {number|null} [maxHeightPx] GetPhotoMediaRequest maxHeightPx + * @property {boolean|null} [skipHttpRedirect] GetPhotoMediaRequest skipHttpRedirect + */ + + /** + * Constructs a new GetPhotoMediaRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a GetPhotoMediaRequest. + * @implements IGetPhotoMediaRequest + * @constructor + * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set + */ + function GetPhotoMediaRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPhotoMediaRequest name. + * @member {string} name + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.name = ""; + + /** + * GetPhotoMediaRequest maxWidthPx. + * @member {number} maxWidthPx + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.maxWidthPx = 0; + + /** + * GetPhotoMediaRequest maxHeightPx. + * @member {number} maxHeightPx + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.maxHeightPx = 0; + + /** + * GetPhotoMediaRequest skipHttpRedirect. + * @member {boolean} skipHttpRedirect + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.skipHttpRedirect = false; + + /** + * Creates a new GetPhotoMediaRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest instance + */ + GetPhotoMediaRequest.create = function create(properties) { + return new GetPhotoMediaRequest(properties); + }; + + /** + * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhotoMediaRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.maxWidthPx != null && Object.hasOwnProperty.call(message, "maxWidthPx")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxWidthPx); + if (message.maxHeightPx != null && Object.hasOwnProperty.call(message, "maxHeightPx")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxHeightPx); + if (message.skipHttpRedirect != null && Object.hasOwnProperty.call(message, "skipHttpRedirect")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipHttpRedirect); + return writer; + }; + + /** + * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhotoMediaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhotoMediaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.maxWidthPx = reader.int32(); + break; + } + case 3: { + message.maxHeightPx = reader.int32(); + break; + } + case 4: { + message.skipHttpRedirect = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhotoMediaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPhotoMediaRequest message. + * @function verify + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPhotoMediaRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) + if (!$util.isInteger(message.maxWidthPx)) + return "maxWidthPx: integer expected"; + if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) + if (!$util.isInteger(message.maxHeightPx)) + return "maxHeightPx: integer expected"; + if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) + if (typeof message.skipHttpRedirect !== "boolean") + return "skipHttpRedirect: boolean expected"; + return null; + }; + + /** + * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest + */ + GetPhotoMediaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.GetPhotoMediaRequest) + return object; + var message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.maxWidthPx != null) + message.maxWidthPx = object.maxWidthPx | 0; + if (object.maxHeightPx != null) + message.maxHeightPx = object.maxHeightPx | 0; + if (object.skipHttpRedirect != null) + message.skipHttpRedirect = Boolean(object.skipHttpRedirect); + return message; + }; + + /** + * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.GetPhotoMediaRequest} message GetPhotoMediaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPhotoMediaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.maxWidthPx = 0; + object.maxHeightPx = 0; + object.skipHttpRedirect = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) + object.maxWidthPx = message.maxWidthPx; + if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) + object.maxHeightPx = message.maxHeightPx; + if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) + object.skipHttpRedirect = message.skipHttpRedirect; + return object; + }; + + /** + * Converts this GetPhotoMediaRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + * @returns {Object.} JSON object + */ + GetPhotoMediaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPhotoMediaRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPhotoMediaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.GetPhotoMediaRequest"; + }; + + return GetPhotoMediaRequest; + })(); + + v1.PhotoMedia = (function() { + + /** + * Properties of a PhotoMedia. + * @memberof google.maps.places.v1 + * @interface IPhotoMedia + * @property {string|null} [name] PhotoMedia name + * @property {string|null} [photoUri] PhotoMedia photoUri + */ + + /** + * Constructs a new PhotoMedia. + * @memberof google.maps.places.v1 + * @classdesc Represents a PhotoMedia. + * @implements IPhotoMedia + * @constructor + * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set + */ + function PhotoMedia(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhotoMedia name. + * @member {string} name + * @memberof google.maps.places.v1.PhotoMedia + * @instance + */ + PhotoMedia.prototype.name = ""; + + /** + * PhotoMedia photoUri. + * @member {string} photoUri + * @memberof google.maps.places.v1.PhotoMedia + * @instance + */ + PhotoMedia.prototype.photoUri = ""; + + /** + * Creates a new PhotoMedia instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia instance + */ + PhotoMedia.create = function create(properties) { + return new PhotoMedia(properties); + }; + + /** + * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoMedia.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.photoUri); + return writer; + }; + + /** + * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoMedia.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoMedia.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.PhotoMedia(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.photoUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoMedia.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhotoMedia message. + * @function verify + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhotoMedia.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + if (!$util.isString(message.photoUri)) + return "photoUri: string expected"; + return null; + }; + + /** + * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + */ + PhotoMedia.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.PhotoMedia) + return object; + var message = new $root.google.maps.places.v1.PhotoMedia(); + if (object.name != null) + message.name = String(object.name); + if (object.photoUri != null) + message.photoUri = String(object.photoUri); + return message; + }; + + /** + * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.PhotoMedia} message PhotoMedia + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhotoMedia.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.photoUri = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + object.photoUri = message.photoUri; + return object; + }; + + /** + * Converts this PhotoMedia to JSON. + * @function toJSON + * @memberof google.maps.places.v1.PhotoMedia + * @instance + * @returns {Object.} JSON object + */ + PhotoMedia.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhotoMedia + * @function getTypeUrl + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhotoMedia.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.PhotoMedia"; + }; + + return PhotoMedia; + })(); + + v1.GetPlaceRequest = (function() { + + /** + * Properties of a GetPlaceRequest. + * @memberof google.maps.places.v1 + * @interface IGetPlaceRequest + * @property {string|null} [name] GetPlaceRequest name + * @property {string|null} [languageCode] GetPlaceRequest languageCode + * @property {string|null} [regionCode] GetPlaceRequest regionCode + * @property {string|null} [sessionToken] GetPlaceRequest sessionToken + */ + + /** + * Constructs a new GetPlaceRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a GetPlaceRequest. + * @implements IGetPlaceRequest + * @constructor + * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set + */ + function GetPlaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPlaceRequest name. + * @member {string} name + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.name = ""; + + /** + * GetPlaceRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.languageCode = ""; + + /** + * GetPlaceRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.regionCode = ""; + + /** + * GetPlaceRequest sessionToken. + * @member {string} sessionToken + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.sessionToken = ""; + + /** + * Creates a new GetPlaceRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest instance + */ + GetPlaceRequest.create = function create(properties) { + return new GetPlaceRequest(properties); + }; + + /** + * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionToken); + return writer; + }; + + /** + * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPlaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.sessionToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPlaceRequest message. + * @function verify + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPlaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (!$util.isString(message.sessionToken)) + return "sessionToken: string expected"; + return null; + }; + + /** + * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + */ + GetPlaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.GetPlaceRequest) + return object; + var message = new $root.google.maps.places.v1.GetPlaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.sessionToken != null) + message.sessionToken = String(object.sessionToken); + return message; + }; + + /** + * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.GetPlaceRequest} message GetPlaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPlaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + object.regionCode = ""; + object.sessionToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + object.sessionToken = message.sessionToken; + return object; + }; + + /** + * Converts this GetPlaceRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetPlaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPlaceRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPlaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.GetPlaceRequest"; + }; + + return GetPlaceRequest; + })(); + + v1.AutocompletePlacesRequest = (function() { + + /** + * Properties of an AutocompletePlacesRequest. + * @memberof google.maps.places.v1 + * @interface IAutocompletePlacesRequest + * @property {string|null} [input] AutocompletePlacesRequest input + * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null} [locationBias] AutocompletePlacesRequest locationBias + * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null} [locationRestriction] AutocompletePlacesRequest locationRestriction + * @property {Array.|null} [includedPrimaryTypes] AutocompletePlacesRequest includedPrimaryTypes + * @property {Array.|null} [includedRegionCodes] AutocompletePlacesRequest includedRegionCodes + * @property {string|null} [languageCode] AutocompletePlacesRequest languageCode + * @property {string|null} [regionCode] AutocompletePlacesRequest regionCode + * @property {google.type.ILatLng|null} [origin] AutocompletePlacesRequest origin + * @property {number|null} [inputOffset] AutocompletePlacesRequest inputOffset + * @property {boolean|null} [includeQueryPredictions] AutocompletePlacesRequest includeQueryPredictions + * @property {string|null} [sessionToken] AutocompletePlacesRequest sessionToken + */ + + /** + * Constructs a new AutocompletePlacesRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents an AutocompletePlacesRequest. + * @implements IAutocompletePlacesRequest + * @constructor + * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set + */ + function AutocompletePlacesRequest(properties) { + this.includedPrimaryTypes = []; + this.includedRegionCodes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutocompletePlacesRequest input. + * @member {string} input + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.input = ""; + + /** + * AutocompletePlacesRequest locationBias. + * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null|undefined} locationBias + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.locationBias = null; + + /** + * AutocompletePlacesRequest locationRestriction. + * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.locationRestriction = null; + + /** + * AutocompletePlacesRequest includedPrimaryTypes. + * @member {Array.} includedPrimaryTypes + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includedPrimaryTypes = $util.emptyArray; + + /** + * AutocompletePlacesRequest includedRegionCodes. + * @member {Array.} includedRegionCodes + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includedRegionCodes = $util.emptyArray; + + /** + * AutocompletePlacesRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.languageCode = ""; + + /** + * AutocompletePlacesRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.regionCode = ""; + + /** + * AutocompletePlacesRequest origin. + * @member {google.type.ILatLng|null|undefined} origin + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.origin = null; + + /** + * AutocompletePlacesRequest inputOffset. + * @member {number} inputOffset + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.inputOffset = 0; + + /** + * AutocompletePlacesRequest includeQueryPredictions. + * @member {boolean} includeQueryPredictions + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includeQueryPredictions = false; + + /** + * AutocompletePlacesRequest sessionToken. + * @member {string} sessionToken + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.sessionToken = ""; + + /** + * Creates a new AutocompletePlacesRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest instance + */ + AutocompletePlacesRequest.create = function create(properties) { + return new AutocompletePlacesRequest(properties); + }; + + /** + * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.input); + if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) + $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.includedPrimaryTypes[i]); + if (message.includedRegionCodes != null && message.includedRegionCodes.length) + for (var i = 0; i < message.includedRegionCodes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedRegionCodes[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.regionCode); + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + $root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.inputOffset != null && Object.hasOwnProperty.call(message, "inputOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.inputOffset); + if (message.includeQueryPredictions != null && Object.hasOwnProperty.call(message, "includeQueryPredictions")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.includeQueryPredictions); + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sessionToken); + return writer; + }; + + /** + * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.input = reader.string(); + break; + } + case 2: { + message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.decode(reader, reader.uint32()); + break; + } + case 3: { + message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) + message.includedPrimaryTypes = []; + message.includedPrimaryTypes.push(reader.string()); + break; + } + case 5: { + if (!(message.includedRegionCodes && message.includedRegionCodes.length)) + message.includedRegionCodes = []; + message.includedRegionCodes.push(reader.string()); + break; + } + case 6: { + message.languageCode = reader.string(); + break; + } + case 7: { + message.regionCode = reader.string(); + break; + } + case 8: { + message.origin = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 9: { + message.inputOffset = reader.int32(); + break; + } + case 10: { + message.includeQueryPredictions = reader.bool(); + break; + } + case 11: { + message.sessionToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutocompletePlacesRequest message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutocompletePlacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.input != null && message.hasOwnProperty("input")) + if (!$util.isString(message.input)) + return "input: string expected"; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) { + var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify(message.locationBias); + if (error) + return "locationBias." + error; + } + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { + if (!Array.isArray(message.includedPrimaryTypes)) + return "includedPrimaryTypes: array expected"; + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + if (!$util.isString(message.includedPrimaryTypes[i])) + return "includedPrimaryTypes: string[] expected"; + } + if (message.includedRegionCodes != null && message.hasOwnProperty("includedRegionCodes")) { + if (!Array.isArray(message.includedRegionCodes)) + return "includedRegionCodes: array expected"; + for (var i = 0; i < message.includedRegionCodes.length; ++i) + if (!$util.isString(message.includedRegionCodes[i])) + return "includedRegionCodes: string[] expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.origin != null && message.hasOwnProperty("origin")) { + var error = $root.google.type.LatLng.verify(message.origin); + if (error) + return "origin." + error; + } + if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) + if (!$util.isInteger(message.inputOffset)) + return "inputOffset: integer expected"; + if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) + if (typeof message.includeQueryPredictions !== "boolean") + return "includeQueryPredictions: boolean expected"; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (!$util.isString(message.sessionToken)) + return "sessionToken: string expected"; + return null; + }; + + /** + * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + */ + AutocompletePlacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); + if (object.input != null) + message.input = String(object.input); + if (object.locationBias != null) { + if (typeof object.locationBias !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationBias: object expected"); + message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.fromObject(object.locationBias); + } + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.fromObject(object.locationRestriction); + } + if (object.includedPrimaryTypes) { + if (!Array.isArray(object.includedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedPrimaryTypes: array expected"); + message.includedPrimaryTypes = []; + for (var i = 0; i < object.includedPrimaryTypes.length; ++i) + message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); + } + if (object.includedRegionCodes) { + if (!Array.isArray(object.includedRegionCodes)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedRegionCodes: array expected"); + message.includedRegionCodes = []; + for (var i = 0; i < object.includedRegionCodes.length; ++i) + message.includedRegionCodes[i] = String(object.includedRegionCodes[i]); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.origin != null) { + if (typeof object.origin !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.origin: object expected"); + message.origin = $root.google.type.LatLng.fromObject(object.origin); + } + if (object.inputOffset != null) + message.inputOffset = object.inputOffset | 0; + if (object.includeQueryPredictions != null) + message.includeQueryPredictions = Boolean(object.includeQueryPredictions); + if (object.sessionToken != null) + message.sessionToken = String(object.sessionToken); + return message; + }; + + /** + * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest} message AutocompletePlacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutocompletePlacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedPrimaryTypes = []; + object.includedRegionCodes = []; + } + if (options.defaults) { + object.input = ""; + object.locationBias = null; + object.locationRestriction = null; + object.languageCode = ""; + object.regionCode = ""; + object.origin = null; + object.inputOffset = 0; + object.includeQueryPredictions = false; + object.sessionToken = ""; + } + if (message.input != null && message.hasOwnProperty("input")) + object.input = message.input; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) + object.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.toObject(message.locationBias, options); + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { + object.includedPrimaryTypes = []; + for (var j = 0; j < message.includedPrimaryTypes.length; ++j) + object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; + } + if (message.includedRegionCodes && message.includedRegionCodes.length) { + object.includedRegionCodes = []; + for (var j = 0; j < message.includedRegionCodes.length; ++j) + object.includedRegionCodes[j] = message.includedRegionCodes[j]; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.origin != null && message.hasOwnProperty("origin")) + object.origin = $root.google.type.LatLng.toObject(message.origin, options); + if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) + object.inputOffset = message.inputOffset; + if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) + object.includeQueryPredictions = message.includeQueryPredictions; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + object.sessionToken = message.sessionToken; + return object; + }; + + /** + * Converts this AutocompletePlacesRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + * @returns {Object.} JSON object + */ + AutocompletePlacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutocompletePlacesRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutocompletePlacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest"; + }; + + AutocompletePlacesRequest.LocationBias = (function() { + + /** + * Properties of a LocationBias. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @interface ILocationBias + * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle + */ + + /** + * Constructs a new LocationBias. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @classdesc Represents a LocationBias. + * @implements ILocationBias + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set + */ + function LocationBias(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationBias rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + LocationBias.prototype.rectangle = null; + + /** + * LocationBias circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + LocationBias.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationBias type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + Object.defineProperty(LocationBias.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationBias instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias instance + */ + LocationBias.create = function create(properties) { + return new LocationBias(properties); + }; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationBias message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationBias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + */ + LocationBias.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} message LocationBias + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationBias.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationBias to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + * @returns {Object.} JSON object + */ + LocationBias.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationBias + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationBias"; + }; + + return LocationBias; + })(); + + AutocompletePlacesRequest.LocationRestriction = (function() { + + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @interface ILocationRestriction + * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle + */ + + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationRestriction rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.rectangle = null; + + /** + * LocationRestriction circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + return AutocompletePlacesRequest; + })(); + + v1.AutocompletePlacesResponse = (function() { + + /** + * Properties of an AutocompletePlacesResponse. + * @memberof google.maps.places.v1 + * @interface IAutocompletePlacesResponse + * @property {Array.|null} [suggestions] AutocompletePlacesResponse suggestions + */ + + /** + * Constructs a new AutocompletePlacesResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents an AutocompletePlacesResponse. + * @implements IAutocompletePlacesResponse + * @constructor + * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set + */ + function AutocompletePlacesResponse(properties) { + this.suggestions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutocompletePlacesResponse suggestions. + * @member {Array.} suggestions + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @instance + */ + AutocompletePlacesResponse.prototype.suggestions = $util.emptyArray; + + /** + * Creates a new AutocompletePlacesResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse instance + */ + AutocompletePlacesResponse.create = function create(properties) { + return new AutocompletePlacesResponse(properties); + }; + + /** + * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutocompletePlacesResponse message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutocompletePlacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify(message.suggestions[i]); + if (error) + return "suggestions." + error; + } + } + return null; + }; + + /** + * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + */ + AutocompletePlacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: object expected"); + message.suggestions[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.fromObject(object.suggestions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse} message AutocompletePlacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutocompletePlacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.toObject(message.suggestions[j], options); + } + return object; + }; + + /** + * Converts this AutocompletePlacesResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @instance + * @returns {Object.} JSON object + */ + AutocompletePlacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutocompletePlacesResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutocompletePlacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse"; + }; + + AutocompletePlacesResponse.Suggestion = (function() { + + /** + * Properties of a Suggestion. + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @interface ISuggestion + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null} [placePrediction] Suggestion placePrediction + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null} [queryPrediction] Suggestion queryPrediction + */ + + /** + * Constructs a new Suggestion. + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @classdesc Represents a Suggestion. + * @implements ISuggestion + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set + */ + function Suggestion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Suggestion placePrediction. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null|undefined} placePrediction + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Suggestion.prototype.placePrediction = null; + + /** + * Suggestion queryPrediction. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null|undefined} queryPrediction + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Suggestion.prototype.queryPrediction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Suggestion kind. + * @member {"placePrediction"|"queryPrediction"|undefined} kind + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Object.defineProperty(Suggestion.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["placePrediction", "queryPrediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Suggestion instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion instance + */ + Suggestion.create = function create(properties) { + return new Suggestion(properties); + }; + + /** + * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placePrediction != null && Object.hasOwnProperty.call(message, "placePrediction")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.encode(message.placePrediction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryPrediction != null && Object.hasOwnProperty.call(message, "queryPrediction")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.encode(message.queryPrediction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.decode(reader, reader.uint32()); + break; + } + case 2: { + message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Suggestion message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Suggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { + properties.kind = 1; + { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify(message.placePrediction); + if (error) + return "placePrediction." + error; + } + } + if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify(message.queryPrediction); + if (error) + return "queryPrediction." + error; + } + } + return null; + }; + + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + */ + Suggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); + if (object.placePrediction != null) { + if (typeof object.placePrediction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.placePrediction: object expected"); + message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.fromObject(object.placePrediction); + } + if (object.queryPrediction != null) { + if (typeof object.queryPrediction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.queryPrediction: object expected"); + message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.fromObject(object.queryPrediction); + } + return message; + }; + + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} message Suggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Suggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { + object.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.toObject(message.placePrediction, options); + if (options.oneofs) + object.kind = "placePrediction"; + } + if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { + object.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.toObject(message.queryPrediction, options); + if (options.oneofs) + object.kind = "queryPrediction"; + } + return object; + }; + + /** + * Converts this Suggestion to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + * @returns {Object.} JSON object + */ + Suggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Suggestion + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Suggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion"; + }; + + Suggestion.StringRange = (function() { + + /** + * Properties of a StringRange. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IStringRange + * @property {number|null} [startOffset] StringRange startOffset + * @property {number|null} [endOffset] StringRange endOffset + */ + + /** + * Constructs a new StringRange. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a StringRange. + * @implements IStringRange + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set + */ + function StringRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringRange startOffset. + * @member {number} startOffset + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + */ + StringRange.prototype.startOffset = 0; + + /** + * StringRange endOffset. + * @member {number} endOffset + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + */ + StringRange.prototype.endOffset = 0; + + /** + * Creates a new StringRange instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange instance + */ + StringRange.create = function create(properties) { + return new StringRange(properties); + }; + + /** + * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringRange message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startOffset = reader.int32(); + break; + } + case 2: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringRange message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a StringRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + */ + StringRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a StringRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} message StringRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startOffset = 0; + object.endOffset = 0; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this StringRange to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + * @returns {Object.} JSON object + */ + StringRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringRange + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange"; + }; + + return StringRange; + })(); + + Suggestion.FormattableText = (function() { + + /** + * Properties of a FormattableText. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IFormattableText + * @property {string|null} [text] FormattableText text + * @property {Array.|null} [matches] FormattableText matches + */ + + /** + * Constructs a new FormattableText. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a FormattableText. + * @implements IFormattableText + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set + */ + function FormattableText(properties) { + this.matches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FormattableText text. + * @member {string} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + */ + FormattableText.prototype.text = ""; + + /** + * FormattableText matches. + * @member {Array.} matches + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + */ + FormattableText.prototype.matches = $util.emptyArray; + + /** + * Creates a new FormattableText instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText instance + */ + FormattableText.create = function create(properties) { + return new FormattableText(properties); + }; + + /** + * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormattableText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.matches != null && message.matches.length) + for (var i = 0; i < message.matches.length; ++i) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.encode(message.matches[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormattableText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FormattableText message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormattableText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.matches && message.matches.length)) + message.matches = []; + message.matches.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FormattableText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormattableText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FormattableText message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FormattableText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.matches != null && message.hasOwnProperty("matches")) { + if (!Array.isArray(message.matches)) + return "matches: array expected"; + for (var i = 0; i < message.matches.length; ++i) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify(message.matches[i]); + if (error) + return "matches." + error; + } + } + return null; + }; + + /** + * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + */ + FormattableText.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); + if (object.text != null) + message.text = String(object.text); + if (object.matches) { + if (!Array.isArray(object.matches)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: array expected"); + message.matches = []; + for (var i = 0; i < object.matches.length; ++i) { + if (typeof object.matches[i] !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: object expected"); + message.matches[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.fromObject(object.matches[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FormattableText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} message FormattableText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FormattableText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.matches = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.matches && message.matches.length) { + object.matches = []; + for (var j = 0; j < message.matches.length; ++j) + object.matches[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.toObject(message.matches[j], options); + } + return object; + }; + + /** + * Converts this FormattableText to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + * @returns {Object.} JSON object + */ + FormattableText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FormattableText + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FormattableText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText"; + }; + + return FormattableText; + })(); + + Suggestion.StructuredFormat = (function() { + + /** + * Properties of a StructuredFormat. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IStructuredFormat + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [mainText] StructuredFormat mainText + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [secondaryText] StructuredFormat secondaryText + */ + + /** + * Constructs a new StructuredFormat. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a StructuredFormat. + * @implements IStructuredFormat + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set + */ + function StructuredFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StructuredFormat mainText. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} mainText + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + */ + StructuredFormat.prototype.mainText = null; + + /** + * StructuredFormat secondaryText. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} secondaryText + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + */ + StructuredFormat.prototype.secondaryText = null; + + /** + * Creates a new StructuredFormat instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat instance + */ + StructuredFormat.create = function create(properties) { + return new StructuredFormat(properties); + }; + + /** + * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StructuredFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mainText != null && Object.hasOwnProperty.call(message, "mainText")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.mainText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.secondaryText != null && Object.hasOwnProperty.call(message, "secondaryText")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.secondaryText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StructuredFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StructuredFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StructuredFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StructuredFormat message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StructuredFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mainText != null && message.hasOwnProperty("mainText")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.mainText); + if (error) + return "mainText." + error; + } + if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.secondaryText); + if (error) + return "secondaryText." + error; + } + return null; + }; + + /** + * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + */ + StructuredFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); + if (object.mainText != null) { + if (typeof object.mainText !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.mainText: object expected"); + message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.mainText); + } + if (object.secondaryText != null) { + if (typeof object.secondaryText !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.secondaryText: object expected"); + message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.secondaryText); + } + return message; + }; + + /** + * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} message StructuredFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StructuredFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mainText = null; + object.secondaryText = null; + } + if (message.mainText != null && message.hasOwnProperty("mainText")) + object.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.mainText, options); + if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) + object.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.secondaryText, options); + return object; + }; + + /** + * Converts this StructuredFormat to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + * @returns {Object.} JSON object + */ + StructuredFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StructuredFormat + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StructuredFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat"; + }; + + return StructuredFormat; + })(); + + Suggestion.PlacePrediction = (function() { + + /** + * Properties of a PlacePrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IPlacePrediction + * @property {string|null} [place] PlacePrediction place + * @property {string|null} [placeId] PlacePrediction placeId + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] PlacePrediction text + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] PlacePrediction structuredFormat + * @property {Array.|null} [types] PlacePrediction types + * @property {number|null} [distanceMeters] PlacePrediction distanceMeters + */ + + /** + * Constructs a new PlacePrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a PlacePrediction. + * @implements IPlacePrediction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set + */ + function PlacePrediction(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlacePrediction place. + * @member {string} place + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.place = ""; + + /** + * PlacePrediction placeId. + * @member {string} placeId + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.placeId = ""; + + /** + * PlacePrediction text. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.text = null; + + /** + * PlacePrediction structuredFormat. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.structuredFormat = null; + + /** + * PlacePrediction types. + * @member {Array.} types + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.types = $util.emptyArray; + + /** + * PlacePrediction distanceMeters. + * @member {number} distanceMeters + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.distanceMeters = 0; + + /** + * Creates a new PlacePrediction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction instance + */ + PlacePrediction.create = function create(properties) { + return new PlacePrediction(properties); + }; + + /** + * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacePrediction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.place != null && Object.hasOwnProperty.call(message, "place")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.place); + if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); + if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.distanceMeters); + return writer; + }; + + /** + * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacePrediction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacePrediction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacePrediction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.place = reader.string(); + break; + } + case 2: { + message.placeId = reader.string(); + break; + } + case 3: { + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 4: { + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 6: { + message.distanceMeters = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacePrediction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacePrediction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacePrediction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.place != null && message.hasOwnProperty("place")) + if (!$util.isString(message.place)) + return "place: string expected"; + if (message.placeId != null && message.hasOwnProperty("placeId")) + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); + if (error) + return "text." + error; + } + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); + if (error) + return "structuredFormat." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) + if (!$util.isInteger(message.distanceMeters)) + return "distanceMeters: integer expected"; + return null; + }; + + /** + * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + */ + PlacePrediction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); + if (object.place != null) + message.place = String(object.place); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.text: object expected"); + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); + } + if (object.structuredFormat != null) { + if (typeof object.structuredFormat !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.structuredFormat: object expected"); + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.distanceMeters != null) + message.distanceMeters = object.distanceMeters | 0; + return message; + }; + + /** + * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} message PlacePrediction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacePrediction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) { + object.place = ""; + object.placeId = ""; + object.text = null; + object.structuredFormat = null; + object.distanceMeters = 0; + } + if (message.place != null && message.hasOwnProperty("place")) + object.place = message.place; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) + object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) + object.distanceMeters = message.distanceMeters; + return object; + }; + + /** + * Converts this PlacePrediction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + * @returns {Object.} JSON object + */ + PlacePrediction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacePrediction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacePrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction"; + }; + + return PlacePrediction; + })(); + + Suggestion.QueryPrediction = (function() { + + /** + * Properties of a QueryPrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IQueryPrediction + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] QueryPrediction text + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] QueryPrediction structuredFormat + */ + + /** + * Constructs a new QueryPrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a QueryPrediction. + * @implements IQueryPrediction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set + */ + function QueryPrediction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPrediction text. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + */ + QueryPrediction.prototype.text = null; + + /** + * QueryPrediction structuredFormat. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + */ + QueryPrediction.prototype.structuredFormat = null; + + /** + * Creates a new QueryPrediction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction instance + */ + QueryPrediction.create = function create(properties) { + return new QueryPrediction(properties); + }; + + /** + * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPrediction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPrediction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPrediction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPrediction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPrediction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPrediction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPrediction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); + if (error) + return "text." + error; + } + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); + if (error) + return "structuredFormat." + error; + } + return null; + }; + + /** + * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + */ + QueryPrediction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.text: object expected"); + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); + } + if (object.structuredFormat != null) { + if (typeof object.structuredFormat !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.structuredFormat: object expected"); + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); + } + return message; + }; + + /** + * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} message QueryPrediction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPrediction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.structuredFormat = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) + object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); + return object; + }; + + /** + * Converts this QueryPrediction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + * @returns {Object.} JSON object + */ + QueryPrediction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryPrediction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryPrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction"; + }; + + return QueryPrediction; + })(); + + return Suggestion; + })(); + + return AutocompletePlacesResponse; + })(); + + return v1; + })(); + + return places; + })(); + + return maps; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.json b/owl-bot-staging/google-maps-places/v1/protos/protos.json new file mode 100644 index 00000000000..421226992bd --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/protos/protos.json @@ -0,0 +1,3848 @@ +{ + "nested": { + "google": { + "nested": { + "geo": { + "nested": { + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/geo/type/viewport;viewport", + "java_multiple_files": true, + "java_outer_classname": "ViewportProto", + "java_package": "com.google.geo.type", + "objc_class_prefix": "GGTP" + }, + "nested": { + "Viewport": { + "fields": { + "low": { + "type": "google.type.LatLng", + "id": 1 + }, + "high": { + "type": "google.type.LatLng", + "id": 2 + } + } + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "LatLng": { + "fields": { + "latitude": { + "type": "double", + "id": 1 + }, + "longitude": { + "type": "double", + "id": 2 + } + } + }, + "LocalizedText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + }, + "Money": { + "fields": { + "currencyCode": { + "type": "string", + "id": 1 + }, + "units": { + "type": "int64", + "id": 2 + }, + "nanos": { + "type": "int32", + "id": 3 + } + } + }, + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + }, + "maps": { + "nested": { + "places": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Maps.Places.V1", + "go_package": "cloud.google.com/go/maps/places/apiv1/placespb;placespb", + "java_multiple_files": true, + "java_outer_classname": "PlacesServiceProto", + "java_package": "com.google.maps.places.v1", + "objc_class_prefix": "GMPSV1", + "php_namespace": "Google\\Maps\\Places\\V1" + }, + "nested": { + "AuthorAttribution": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "photoUri": { + "type": "string", + "id": 3 + } + } + }, + "ContentBlock": { + "fields": { + "topic": { + "type": "string", + "id": 1 + }, + "content": { + "type": "google.type.LocalizedText", + "id": 2 + }, + "references": { + "type": "References", + "id": 3 + } + } + }, + "References": { + "fields": { + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 1 + }, + "places": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + } + } + }, + "Review": { + "options": { + "(google.api.resource).type": "places.googleapis.com/Review", + "(google.api.resource).pattern": "places/{place}/reviews/{review}", + "(google.api.resource).plural": "reviews", + "(google.api.resource).singular": "review" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "relativePublishTimeDescription": { + "type": "string", + "id": 2 + }, + "text": { + "type": "google.type.LocalizedText", + "id": 9 + }, + "originalText": { + "type": "google.type.LocalizedText", + "id": 12 + }, + "rating": { + "type": "double", + "id": 7 + }, + "authorAttribution": { + "type": "AuthorAttribution", + "id": 13 + }, + "publishTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + } + } + }, + "ContextualContent": { + "fields": { + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 1 + }, + "photos": { + "rule": "repeated", + "type": "Photo", + "id": 2 + }, + "justifications": { + "rule": "repeated", + "type": "Justification", + "id": 3 + } + }, + "nested": { + "Justification": { + "oneofs": { + "justification": { + "oneof": [ + "reviewJustification", + "businessAvailabilityAttributesJustification" + ] + } + }, + "fields": { + "reviewJustification": { + "type": "ReviewJustification", + "id": 1 + }, + "businessAvailabilityAttributesJustification": { + "type": "BusinessAvailabilityAttributesJustification", + "id": 2 + } + }, + "nested": { + "ReviewJustification": { + "fields": { + "highlightedText": { + "type": "HighlightedText", + "id": 1 + }, + "review": { + "type": "Review", + "id": 2 + } + }, + "nested": { + "HighlightedText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "highlightedTextRanges": { + "rule": "repeated", + "type": "HighlightedTextRange", + "id": 2 + } + }, + "nested": { + "HighlightedTextRange": { + "fields": { + "startIndex": { + "type": "int32", + "id": 1 + }, + "endIndex": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + }, + "BusinessAvailabilityAttributesJustification": { + "fields": { + "takeout": { + "type": "bool", + "id": 1 + }, + "delivery": { + "type": "bool", + "id": 2 + }, + "dineIn": { + "type": "bool", + "id": 3 + } + } + } + } + } + } + }, + "Photo": { + "options": { + "(google.api.resource).type": "places.googleapis.com/Photo", + "(google.api.resource).pattern": "places/{place}/photos/{photo}", + "(google.api.resource).plural": "photos", + "(google.api.resource).singular": "photo" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "widthPx": { + "type": "int32", + "id": 2 + }, + "heightPx": { + "type": "int32", + "id": 3 + }, + "authorAttributions": { + "rule": "repeated", + "type": "AuthorAttribution", + "id": 4 + } + } + }, + "EVChargeOptions": { + "fields": { + "connectorCount": { + "type": "int32", + "id": 1 + }, + "connectorAggregation": { + "rule": "repeated", + "type": "ConnectorAggregation", + "id": 2 + } + }, + "nested": { + "ConnectorAggregation": { + "oneofs": { + "_availableCount": { + "oneof": [ + "availableCount" + ] + }, + "_outOfServiceCount": { + "oneof": [ + "outOfServiceCount" + ] + } + }, + "fields": { + "type": { + "type": "EVConnectorType", + "id": 1 + }, + "maxChargeRateKw": { + "type": "double", + "id": 2 + }, + "count": { + "type": "int32", + "id": 3 + }, + "availableCount": { + "type": "int32", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "outOfServiceCount": { + "type": "int32", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "availabilityLastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + } + } + }, + "EVConnectorType": { + "values": { + "EV_CONNECTOR_TYPE_UNSPECIFIED": 0, + "EV_CONNECTOR_TYPE_OTHER": 1, + "EV_CONNECTOR_TYPE_J1772": 2, + "EV_CONNECTOR_TYPE_TYPE_2": 3, + "EV_CONNECTOR_TYPE_CHADEMO": 4, + "EV_CONNECTOR_TYPE_CCS_COMBO_1": 5, + "EV_CONNECTOR_TYPE_CCS_COMBO_2": 6, + "EV_CONNECTOR_TYPE_TESLA": 7, + "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": 8, + "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": 9 + } + }, + "FuelOptions": { + "fields": { + "fuelPrices": { + "rule": "repeated", + "type": "FuelPrice", + "id": 1 + } + }, + "nested": { + "FuelPrice": { + "fields": { + "type": { + "type": "FuelType", + "id": 1 + }, + "price": { + "type": "google.type.Money", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "FuelType": { + "values": { + "FUEL_TYPE_UNSPECIFIED": 0, + "DIESEL": 1, + "REGULAR_UNLEADED": 2, + "MIDGRADE": 3, + "PREMIUM": 4, + "SP91": 5, + "SP91_E10": 6, + "SP92": 7, + "SP95": 8, + "SP95_E10": 9, + "SP98": 10, + "SP99": 11, + "SP100": 12, + "LPG": 13, + "E80": 14, + "E85": 15, + "METHANE": 16, + "BIO_DIESEL": 17, + "TRUCK_DIESEL": 18 + } + } + } + } + } + }, + "Circle": { + "fields": { + "center": { + "type": "google.type.LatLng", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "radius": { + "type": "double", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Place": { + "options": { + "(google.api.resource).type": "places.googleapis.com/Place", + "(google.api.resource).pattern": "places/{place_id}", + "(google.api.resource).plural": "places", + "(google.api.resource).singular": "place" + }, + "oneofs": { + "_utcOffsetMinutes": { + "oneof": [ + "utcOffsetMinutes" + ] + }, + "_userRatingCount": { + "oneof": [ + "userRatingCount" + ] + }, + "_takeout": { + "oneof": [ + "takeout" + ] + }, + "_delivery": { + "oneof": [ + "delivery" + ] + }, + "_dineIn": { + "oneof": [ + "dineIn" + ] + }, + "_curbsidePickup": { + "oneof": [ + "curbsidePickup" + ] + }, + "_reservable": { + "oneof": [ + "reservable" + ] + }, + "_servesBreakfast": { + "oneof": [ + "servesBreakfast" + ] + }, + "_servesLunch": { + "oneof": [ + "servesLunch" + ] + }, + "_servesDinner": { + "oneof": [ + "servesDinner" + ] + }, + "_servesBeer": { + "oneof": [ + "servesBeer" + ] + }, + "_servesWine": { + "oneof": [ + "servesWine" + ] + }, + "_servesBrunch": { + "oneof": [ + "servesBrunch" + ] + }, + "_servesVegetarianFood": { + "oneof": [ + "servesVegetarianFood" + ] + }, + "_outdoorSeating": { + "oneof": [ + "outdoorSeating" + ] + }, + "_liveMusic": { + "oneof": [ + "liveMusic" + ] + }, + "_menuForChildren": { + "oneof": [ + "menuForChildren" + ] + }, + "_servesCocktails": { + "oneof": [ + "servesCocktails" + ] + }, + "_servesDessert": { + "oneof": [ + "servesDessert" + ] + }, + "_servesCoffee": { + "oneof": [ + "servesCoffee" + ] + }, + "_goodForChildren": { + "oneof": [ + "goodForChildren" + ] + }, + "_allowsDogs": { + "oneof": [ + "allowsDogs" + ] + }, + "_restroom": { + "oneof": [ + "restroom" + ] + }, + "_goodForGroups": { + "oneof": [ + "goodForGroups" + ] + }, + "_goodForWatchingSports": { + "oneof": [ + "goodForWatchingSports" + ] + }, + "_accessibilityOptions": { + "oneof": [ + "accessibilityOptions" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "id": { + "type": "string", + "id": 2 + }, + "displayName": { + "type": "google.type.LocalizedText", + "id": 31 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "primaryType": { + "type": "string", + "id": 50 + }, + "primaryTypeDisplayName": { + "type": "google.type.LocalizedText", + "id": 32 + }, + "nationalPhoneNumber": { + "type": "string", + "id": 7 + }, + "internationalPhoneNumber": { + "type": "string", + "id": 8 + }, + "formattedAddress": { + "type": "string", + "id": 9 + }, + "shortFormattedAddress": { + "type": "string", + "id": 51 + }, + "addressComponents": { + "rule": "repeated", + "type": "AddressComponent", + "id": 10 + }, + "plusCode": { + "type": "PlusCode", + "id": 11 + }, + "location": { + "type": "google.type.LatLng", + "id": 12 + }, + "viewport": { + "type": "google.geo.type.Viewport", + "id": 13 + }, + "rating": { + "type": "double", + "id": 14 + }, + "googleMapsUri": { + "type": "string", + "id": 15 + }, + "websiteUri": { + "type": "string", + "id": 16 + }, + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 53 + }, + "regularOpeningHours": { + "type": "OpeningHours", + "id": 21 + }, + "utcOffsetMinutes": { + "type": "int32", + "id": 22, + "options": { + "proto3_optional": true + } + }, + "photos": { + "rule": "repeated", + "type": "Photo", + "id": 54 + }, + "adrFormatAddress": { + "type": "string", + "id": 24 + }, + "businessStatus": { + "type": "BusinessStatus", + "id": 25 + }, + "priceLevel": { + "type": "PriceLevel", + "id": 26 + }, + "attributions": { + "rule": "repeated", + "type": "Attribution", + "id": 27 + }, + "userRatingCount": { + "type": "int32", + "id": 28, + "options": { + "proto3_optional": true + } + }, + "iconMaskBaseUri": { + "type": "string", + "id": 29 + }, + "iconBackgroundColor": { + "type": "string", + "id": 30 + }, + "takeout": { + "type": "bool", + "id": 33, + "options": { + "proto3_optional": true + } + }, + "delivery": { + "type": "bool", + "id": 34, + "options": { + "proto3_optional": true + } + }, + "dineIn": { + "type": "bool", + "id": 35, + "options": { + "proto3_optional": true + } + }, + "curbsidePickup": { + "type": "bool", + "id": 36, + "options": { + "proto3_optional": true + } + }, + "reservable": { + "type": "bool", + "id": 38, + "options": { + "proto3_optional": true + } + }, + "servesBreakfast": { + "type": "bool", + "id": 39, + "options": { + "proto3_optional": true + } + }, + "servesLunch": { + "type": "bool", + "id": 40, + "options": { + "proto3_optional": true + } + }, + "servesDinner": { + "type": "bool", + "id": 41, + "options": { + "proto3_optional": true + } + }, + "servesBeer": { + "type": "bool", + "id": 42, + "options": { + "proto3_optional": true + } + }, + "servesWine": { + "type": "bool", + "id": 43, + "options": { + "proto3_optional": true + } + }, + "servesBrunch": { + "type": "bool", + "id": 44, + "options": { + "proto3_optional": true + } + }, + "servesVegetarianFood": { + "type": "bool", + "id": 45, + "options": { + "proto3_optional": true + } + }, + "currentOpeningHours": { + "type": "OpeningHours", + "id": 46 + }, + "currentSecondaryOpeningHours": { + "rule": "repeated", + "type": "OpeningHours", + "id": 47 + }, + "regularSecondaryOpeningHours": { + "rule": "repeated", + "type": "OpeningHours", + "id": 49 + }, + "editorialSummary": { + "type": "google.type.LocalizedText", + "id": 52 + }, + "outdoorSeating": { + "type": "bool", + "id": 55, + "options": { + "proto3_optional": true + } + }, + "liveMusic": { + "type": "bool", + "id": 56, + "options": { + "proto3_optional": true + } + }, + "menuForChildren": { + "type": "bool", + "id": 57, + "options": { + "proto3_optional": true + } + }, + "servesCocktails": { + "type": "bool", + "id": 58, + "options": { + "proto3_optional": true + } + }, + "servesDessert": { + "type": "bool", + "id": 59, + "options": { + "proto3_optional": true + } + }, + "servesCoffee": { + "type": "bool", + "id": 60, + "options": { + "proto3_optional": true + } + }, + "goodForChildren": { + "type": "bool", + "id": 62, + "options": { + "proto3_optional": true + } + }, + "allowsDogs": { + "type": "bool", + "id": 63, + "options": { + "proto3_optional": true + } + }, + "restroom": { + "type": "bool", + "id": 64, + "options": { + "proto3_optional": true + } + }, + "goodForGroups": { + "type": "bool", + "id": 65, + "options": { + "proto3_optional": true + } + }, + "goodForWatchingSports": { + "type": "bool", + "id": 66, + "options": { + "proto3_optional": true + } + }, + "paymentOptions": { + "type": "PaymentOptions", + "id": 67 + }, + "parkingOptions": { + "type": "ParkingOptions", + "id": 70 + }, + "subDestinations": { + "rule": "repeated", + "type": "SubDestination", + "id": 71 + }, + "accessibilityOptions": { + "type": "AccessibilityOptions", + "id": 72, + "options": { + "proto3_optional": true + } + }, + "fuelOptions": { + "type": "FuelOptions", + "id": 78 + }, + "evChargeOptions": { + "type": "EVChargeOptions", + "id": 79 + }, + "generativeSummary": { + "type": "GenerativeSummary", + "id": 80 + }, + "areaSummary": { + "type": "AreaSummary", + "id": 81 + } + }, + "nested": { + "AddressComponent": { + "fields": { + "longText": { + "type": "string", + "id": 1 + }, + "shortText": { + "type": "string", + "id": 2 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "languageCode": { + "type": "string", + "id": 4 + } + } + }, + "PlusCode": { + "fields": { + "globalCode": { + "type": "string", + "id": 1 + }, + "compoundCode": { + "type": "string", + "id": 2 + } + } + }, + "OpeningHours": { + "oneofs": { + "_openNow": { + "oneof": [ + "openNow" + ] + } + }, + "fields": { + "openNow": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "periods": { + "rule": "repeated", + "type": "Period", + "id": 2 + }, + "weekdayDescriptions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "secondaryHoursType": { + "type": "SecondaryHoursType", + "id": 4 + }, + "specialDays": { + "rule": "repeated", + "type": "SpecialDay", + "id": 5 + } + }, + "nested": { + "Period": { + "fields": { + "open": { + "type": "Point", + "id": 1 + }, + "close": { + "type": "Point", + "id": 2 + } + }, + "nested": { + "Point": { + "oneofs": { + "_day": { + "oneof": [ + "day" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + } + }, + "fields": { + "day": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "date": { + "type": "google.type.Date", + "id": 6 + }, + "truncated": { + "type": "bool", + "id": 5 + } + } + } + } + }, + "SecondaryHoursType": { + "values": { + "SECONDARY_HOURS_TYPE_UNSPECIFIED": 0, + "DRIVE_THROUGH": 1, + "HAPPY_HOUR": 2, + "DELIVERY": 3, + "TAKEOUT": 4, + "KITCHEN": 5, + "BREAKFAST": 6, + "LUNCH": 7, + "DINNER": 8, + "BRUNCH": 9, + "PICKUP": 10, + "ACCESS": 11, + "SENIOR_HOURS": 12, + "ONLINE_SERVICE_HOURS": 13 + } + }, + "SpecialDay": { + "fields": { + "date": { + "type": "google.type.Date", + "id": 1 + } + } + } + } + }, + "BusinessStatus": { + "values": { + "BUSINESS_STATUS_UNSPECIFIED": 0, + "OPERATIONAL": 1, + "CLOSED_TEMPORARILY": 2, + "CLOSED_PERMANENTLY": 3 + } + }, + "Attribution": { + "fields": { + "provider": { + "type": "string", + "id": 1 + }, + "providerUri": { + "type": "string", + "id": 2 + } + } + }, + "PaymentOptions": { + "oneofs": { + "_acceptsCreditCards": { + "oneof": [ + "acceptsCreditCards" + ] + }, + "_acceptsDebitCards": { + "oneof": [ + "acceptsDebitCards" + ] + }, + "_acceptsCashOnly": { + "oneof": [ + "acceptsCashOnly" + ] + }, + "_acceptsNfc": { + "oneof": [ + "acceptsNfc" + ] + } + }, + "fields": { + "acceptsCreditCards": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "acceptsDebitCards": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "acceptsCashOnly": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "acceptsNfc": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "ParkingOptions": { + "oneofs": { + "_freeParkingLot": { + "oneof": [ + "freeParkingLot" + ] + }, + "_paidParkingLot": { + "oneof": [ + "paidParkingLot" + ] + }, + "_freeStreetParking": { + "oneof": [ + "freeStreetParking" + ] + }, + "_paidStreetParking": { + "oneof": [ + "paidStreetParking" + ] + }, + "_valetParking": { + "oneof": [ + "valetParking" + ] + }, + "_freeGarageParking": { + "oneof": [ + "freeGarageParking" + ] + }, + "_paidGarageParking": { + "oneof": [ + "paidGarageParking" + ] + } + }, + "fields": { + "freeParkingLot": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "paidParkingLot": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "freeStreetParking": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "paidStreetParking": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "valetParking": { + "type": "bool", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "freeGarageParking": { + "type": "bool", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "paidGarageParking": { + "type": "bool", + "id": 7, + "options": { + "proto3_optional": true + } + } + } + }, + "SubDestination": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + }, + "id": { + "type": "string", + "id": 2 + } + } + }, + "AccessibilityOptions": { + "oneofs": { + "_wheelchairAccessibleParking": { + "oneof": [ + "wheelchairAccessibleParking" + ] + }, + "_wheelchairAccessibleEntrance": { + "oneof": [ + "wheelchairAccessibleEntrance" + ] + }, + "_wheelchairAccessibleRestroom": { + "oneof": [ + "wheelchairAccessibleRestroom" + ] + }, + "_wheelchairAccessibleSeating": { + "oneof": [ + "wheelchairAccessibleSeating" + ] + } + }, + "fields": { + "wheelchairAccessibleParking": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "wheelchairAccessibleEntrance": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "wheelchairAccessibleRestroom": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "wheelchairAccessibleSeating": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "GenerativeSummary": { + "fields": { + "overview": { + "type": "google.type.LocalizedText", + "id": 1 + }, + "description": { + "type": "google.type.LocalizedText", + "id": 2 + }, + "references": { + "type": "References", + "id": 3 + } + } + }, + "AreaSummary": { + "fields": { + "contentBlocks": { + "rule": "repeated", + "type": "ContentBlock", + "id": 4 + } + } + } + } + }, + "PriceLevel": { + "values": { + "PRICE_LEVEL_UNSPECIFIED": 0, + "PRICE_LEVEL_FREE": 1, + "PRICE_LEVEL_INEXPENSIVE": 2, + "PRICE_LEVEL_MODERATE": 3, + "PRICE_LEVEL_EXPENSIVE": 4, + "PRICE_LEVEL_VERY_EXPENSIVE": 5 + } + }, + "Places": { + "options": { + "(google.api.default_host)": "places.googleapis.com" + }, + "methods": { + "SearchNearby": { + "requestType": "SearchNearbyRequest", + "responseType": "SearchNearbyResponse", + "options": { + "(google.api.http).post": "/v1/places:searchNearby", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/places:searchNearby", + "body": "*" + } + } + ] + }, + "SearchText": { + "requestType": "SearchTextRequest", + "responseType": "SearchTextResponse", + "options": { + "(google.api.http).post": "/v1/places:searchText", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/places:searchText", + "body": "*" + } + } + ] + }, + "GetPhotoMedia": { + "requestType": "GetPhotoMediaRequest", + "responseType": "PhotoMedia", + "options": { + "(google.api.http).get": "/v1/{name=places/*/photos/*/media}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=places/*/photos/*/media}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetPlace": { + "requestType": "GetPlaceRequest", + "responseType": "Place", + "options": { + "(google.api.http).get": "/v1/{name=places/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=places/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "AutocompletePlaces": { + "requestType": "AutocompletePlacesRequest", + "responseType": "AutocompletePlacesResponse", + "options": { + "(google.api.http).post": "/v1/places:autocomplete", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/places:autocomplete", + "body": "*" + } + } + ] + } + } + }, + "SearchNearbyRequest": { + "fields": { + "languageCode": { + "type": "string", + "id": 1 + }, + "regionCode": { + "type": "string", + "id": 2 + }, + "includedTypes": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "excludedTypes": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "includedPrimaryTypes": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "excludedPrimaryTypes": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "maxResultCount": { + "type": "int32", + "id": 7 + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rankPreference": { + "type": "RankPreference", + "id": 9 + } + }, + "nested": { + "LocationRestriction": { + "oneofs": { + "type": { + "oneof": [ + "circle" + ] + } + }, + "fields": { + "circle": { + "type": "Circle", + "id": 2 + } + } + }, + "RankPreference": { + "values": { + "RANK_PREFERENCE_UNSPECIFIED": 0, + "DISTANCE": 1, + "POPULARITY": 2 + } + } + } + }, + "SearchNearbyResponse": { + "fields": { + "places": { + "rule": "repeated", + "type": "Place", + "id": 1 + } + } + }, + "SearchTextRequest": { + "fields": { + "textQuery": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "regionCode": { + "type": "string", + "id": 3 + }, + "rankPreference": { + "type": "RankPreference", + "id": 4 + }, + "includedType": { + "type": "string", + "id": 6 + }, + "openNow": { + "type": "bool", + "id": 7 + }, + "minRating": { + "type": "double", + "id": 9 + }, + "maxResultCount": { + "type": "int32", + "id": 10 + }, + "priceLevels": { + "rule": "repeated", + "type": "PriceLevel", + "id": 11 + }, + "strictTypeFiltering": { + "type": "bool", + "id": 12 + }, + "locationBias": { + "type": "LocationBias", + "id": 13 + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 14 + }, + "evOptions": { + "type": "EVOptions", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RankPreference": { + "values": { + "RANK_PREFERENCE_UNSPECIFIED": 0, + "DISTANCE": 1, + "RELEVANCE": 2 + } + }, + "LocationBias": { + "oneofs": { + "type": { + "oneof": [ + "rectangle", + "circle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 + } + } + }, + "LocationRestriction": { + "oneofs": { + "type": { + "oneof": [ + "rectangle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + } + } + }, + "EVOptions": { + "fields": { + "minimumChargingRateKw": { + "type": "double", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "connectorTypes": { + "rule": "repeated", + "type": "EVConnectorType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SearchTextResponse": { + "fields": { + "places": { + "rule": "repeated", + "type": "Place", + "id": 1 + }, + "contextualContents": { + "rule": "repeated", + "type": "ContextualContent", + "id": 3 + } + } + }, + "GetPhotoMediaRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "places.googleapis.com/PhotoMedia" + } + }, + "maxWidthPx": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxHeightPx": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skipHttpRedirect": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PhotoMedia": { + "options": { + "(google.api.resource).type": "places.googleapis.com/PhotoMedia", + "(google.api.resource).pattern": "places/{place_id}/photos/{photo_reference}/media", + "(google.api.resource).plural": "photoMedias", + "(google.api.resource).singular": "photoMedia" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "photoUri": { + "type": "string", + "id": 2 + } + } + }, + "GetPlaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "regionCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sessionToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AutocompletePlacesRequest": { + "fields": { + "input": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "locationBias": { + "type": "LocationBias", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includedPrimaryTypes": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includedRegionCodes": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "languageCode": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "regionCode": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "origin": { + "type": "google.type.LatLng", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inputOffset": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includeQueryPredictions": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sessionToken": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "LocationBias": { + "oneofs": { + "type": { + "oneof": [ + "rectangle", + "circle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 + } + } + }, + "LocationRestriction": { + "oneofs": { + "type": { + "oneof": [ + "rectangle", + "circle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 + } + } + } + } + }, + "AutocompletePlacesResponse": { + "fields": { + "suggestions": { + "rule": "repeated", + "type": "Suggestion", + "id": 1 + } + }, + "nested": { + "Suggestion": { + "oneofs": { + "kind": { + "oneof": [ + "placePrediction", + "queryPrediction" + ] + } + }, + "fields": { + "placePrediction": { + "type": "PlacePrediction", + "id": 1 + }, + "queryPrediction": { + "type": "QueryPrediction", + "id": 2 + } + }, + "nested": { + "StringRange": { + "fields": { + "startOffset": { + "type": "int32", + "id": 1 + }, + "endOffset": { + "type": "int32", + "id": 2 + } + } + }, + "FormattableText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "matches": { + "rule": "repeated", + "type": "StringRange", + "id": 2 + } + } + }, + "StructuredFormat": { + "fields": { + "mainText": { + "type": "FormattableText", + "id": 1 + }, + "secondaryText": { + "type": "FormattableText", + "id": 2 + } + } + }, + "PlacePrediction": { + "fields": { + "place": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + }, + "placeId": { + "type": "string", + "id": 2 + }, + "text": { + "type": "FormattableText", + "id": 3 + }, + "structuredFormat": { + "type": "StructuredFormat", + "id": 4 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "distanceMeters": { + "type": "int32", + "id": 6 + } + } + }, + "QueryPrediction": { + "fields": { + "text": { + "type": "FormattableText", + "id": 1 + }, + "structuredFormat": { + "type": "StructuredFormat", + "id": 2 + } + } + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js new file mode 100644 index 00000000000..94f17586f3f --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js @@ -0,0 +1,151 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(input) { + // [START places_v1_generated_Places_AutocompletePlaces_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The text string on which to search. + */ + // const input = 'abc123' + /** + * Optional. Bias results to a specified location. + * At most one of `location_bias` or `location_restriction` should be set. If + * neither are set, the results will be biased by IP address, meaning the IP + * address will be mapped to an imprecise location and used as a biasing + * signal. + */ + // const locationBias = {} + /** + * Optional. Restrict results to a specified location. + * At most one of `location_bias` or `location_restriction` should be set. If + * neither are set, the results will be biased by IP address, meaning the IP + * address will be mapped to an imprecise location and used as a biasing + * signal. + */ + // const locationRestriction = {} + /** + * Optional. Included primary Place type (for example, "restaurant" or + * "gas_station") in Place Types + * (https://developers.google.com/maps/documentation/places/web-service/place-types), + * or only `(regions)`, or only `(cities)`. A Place is only returned if its + * primary type is included in this list. Up to 5 values can be specified. If + * no types are specified, all Place types are returned. + */ + // const includedPrimaryTypes = ['abc','def'] + /** + * Optional. Only include results in the specified regions, specified as up to + * 15 CLDR two-character region codes. An empty set will not restrict the + * results. If both `location_restriction` and `included_region_codes` are + * set, the results will be located in the area of intersection. + */ + // const includedRegionCodes = ['abc','def'] + /** + * Optional. The language in which to return results. Defaults to en-US. The + * results may be in mixed languages if the language used in `input` is + * different from `language_code` or if the returned Place does not have a + * translation from the local language to `language_code`. + */ + // const languageCode = 'abc123' + /** + * Optional. The region code, specified as a CLDR two-character region code. + * This affects address formatting, result ranking, and may influence what + * results are returned. This does not restrict results to the specified + * region. To restrict results to a region, use `region_code_restriction`. + */ + // const regionCode = 'abc123' + /** + * Optional. The origin point from which to calculate geodesic distance to the + * destination (returned as `distance_meters`). If this value is omitted, + * geodesic distance will not be returned. + */ + // const origin = {} + /** + * Optional. A zero-based Unicode character offset of `input` indicating the + * cursor position in `input`. The cursor position may influence what + * predictions are returned. + * If empty, defaults to the length of `input`. + */ + // const inputOffset = 1234 + /** + * Optional. If true, the response will include both Place and query + * predictions. Otherwise the response will only return Place predictions. + */ + // const includeQueryPredictions = true + /** + * Optional. A string which identifies an Autocomplete session for billing + * purposes. Must be a URL and filename safe base64 string with at most 36 + * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + * returned. + * The session begins when the user starts typing a query, and concludes when + * they select a place and a call to Place Details or Address Validation is + * made. Each session can have multiple queries, followed by one Place Details + * or Address Validation request. The credentials used for each request within + * a session must belong to the same Google Cloud Console project. Once a + * session has concluded, the token is no longer valid; your app must generate + * a fresh token for each session. If the `session_token` parameter is + * omitted, or if you reuse a session token, the session is charged as if no + * session token was provided (each request is billed separately). + * We recommend the following guidelines: + * * Use session tokens for all Place Autocomplete calls. + * * Generate a fresh token for each session. Using a version 4 UUID is + * recommended. + * * Ensure that the credentials used for all Place Autocomplete, Place + * Details, and Address Validation requests within a session belong to the + * same Cloud Console project. + * * Be sure to pass a unique session token for each new session. Using the + * same token for more than one session will result in each request being + * billed individually. + */ + // const sessionToken = 'abc123' + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callAutocompletePlaces() { + // Construct request + const request = { + input, + }; + + // Run request + const response = await placesClient.autocompletePlaces(request); + console.log(response); + } + + callAutocompletePlaces(); + // [END places_v1_generated_Places_AutocompletePlaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js new file mode 100644 index 00000000000..2334f19dd6d --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js @@ -0,0 +1,99 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START places_v1_generated_Places_GetPhotoMedia_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of a photo media in the format: + * `places/{place_id}/photos/{photo_reference}/media`. + * The resource name of a photo as returned in a Place object's `photos.name` + * field comes with the format + * `places/{place_id}/photos/{photo_reference}`. You need to append `/media` + * at the end of the photo resource to get the photo media resource name. + */ + // const name = 'abc123' + /** + * Optional. Specifies the maximum desired width, in pixels, of the image. If + * the image is smaller than the values specified, the original image will be + * returned. If the image is larger in either dimension, it will be scaled to + * match the smaller of the two dimensions, restricted to its original aspect + * ratio. Both the max_height_px and max_width_px properties accept an integer + * between 1 and 4800, inclusively. If the value is not within the allowed + * range, an INVALID_ARGUMENT error will be returned. + * At least one of max_height_px or max_width_px needs to be specified. If + * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + * error will be returned. + */ + // const maxWidthPx = 1234 + /** + * Optional. Specifies the maximum desired height, in pixels, of the image. If + * the image is smaller than the values specified, the original image will be + * returned. If the image is larger in either dimension, it will be scaled to + * match the smaller of the two dimensions, restricted to its original aspect + * ratio. Both the max_height_px and max_width_px properties accept an integer + * between 1 and 4800, inclusively. If the value is not within the allowed + * range, an INVALID_ARGUMENT error will be returned. + * At least one of max_height_px or max_width_px needs to be specified. If + * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + * error will be returned. + */ + // const maxHeightPx = 1234 + /** + * Optional. If set, skip the default HTTP redirect behavior and render a text + * format (for example, in JSON format for HTTP use case) response. If not + * set, an HTTP redirect will be issued to redirect the call to the image + * media. This option is ignored for non-HTTP requests. + */ + // const skipHttpRedirect = true + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callGetPhotoMedia() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await placesClient.getPhotoMedia(request); + console.log(response); + } + + callGetPhotoMedia(); + // [END places_v1_generated_Places_GetPhotoMedia_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js new file mode 100644 index 00000000000..892573f2bc2 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js @@ -0,0 +1,104 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START places_v1_generated_Places_GetPlace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of a place, in the `places/{place_id}` format. + */ + // const name = 'abc123' + /** + * Optional. Place details will be displayed with the preferred language if + * available. + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + */ + // const languageCode = 'abc123' + /** + * Optional. The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * Note that 3-digit region codes are not currently supported. + */ + // const regionCode = 'abc123' + /** + * Optional. A string which identifies an Autocomplete session for billing + * purposes. Must be a URL and filename safe base64 string with at most 36 + * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + * returned. + * The session begins when the user starts typing a query, and concludes when + * they select a place and a call to Place Details or Address Validation is + * made. Each session can have multiple queries, followed by one Place Details + * or Address Validation request. The credentials used for each request within + * a session must belong to the same Google Cloud Console project. Once a + * session has concluded, the token is no longer valid; your app must generate + * a fresh token for each session. If the `session_token` parameter is + * omitted, or if you reuse a session token, the session is charged as if no + * session token was provided (each request is billed separately). + * We recommend the following guidelines: + * * Use session tokens for all Place Autocomplete calls. + * * Generate a fresh token for each session. Using a version 4 UUID is + * recommended. + * * Ensure that the credentials used for all Place Autocomplete, Place + * Details, and Address Validation requests within a session belong to the + * same Cloud Console project. + * * Be sure to pass a unique session token for each new session. Using the + * same token for more than one session will result in each request being + * billed individually. + */ + // const sessionToken = 'abc123' + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callGetPlace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await placesClient.getPlace(request); + console.log(response); + } + + callGetPlace(); + // [END places_v1_generated_Places_GetPlace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js new file mode 100644 index 00000000000..cb9c6a6f247 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js @@ -0,0 +1,160 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(locationRestriction) { + // [START places_v1_generated_Places_SearchNearby_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + */ + // const languageCode = 'abc123' + /** + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * Note that 3-digit region codes are not currently supported. + */ + // const regionCode = 'abc123' + /** + * Included Place type (eg, "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * Up to 50 types from Table + * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * If there are any conflicting types, i.e. a type appears in both + * included_types and excluded_types, an INVALID_ARGUMENT error is + * returned. + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = "restaurant", excluded_primary_types = + * "restaurant" }, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + */ + // const includedTypes = ['abc','def'] + /** + * Excluded Place type (eg, "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * Up to 50 types from Table + * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * If the client provides both included_types (e.g. restaurant) and + * excluded_types (e.g. cafe), then the response should include places that + * are restaurant but not cafe. The response includes places that match at + * least one of the included_types and none of the excluded_types. + * If there are any conflicting types, i.e. a type appears in both + * included_types and excluded_types, an INVALID_ARGUMENT error is returned. + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = "restaurant", excluded_primary_types = + * "restaurant" }, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + */ + // const excludedTypes = ['abc','def'] + /** + * Included primary Place type (e.g. "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * A place can only have a single primary type from the supported types table + * associated with it. + * Up to 50 types from Table + * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * If there are any conflicting primary types, i.e. a type appears in both + * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + * error is returned. + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = "restaurant", excluded_primary_types = + * "restaurant" }, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + */ + // const includedPrimaryTypes = ['abc','def'] + /** + * Excluded primary Place type (e.g. "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * Up to 50 types from Table + * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * If there are any conflicting primary types, i.e. a type appears in both + * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + * error is returned. + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = "restaurant", excluded_primary_types = + * "restaurant" }, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + */ + // const excludedPrimaryTypes = ['abc','def'] + /** + * Maximum number of results to return. It must be between 1 and 20 (default), + * inclusively. If the number is unset, it falls back to the upper limit. If + * the number is set to negative or exceeds the upper limit, an + * INVALID_ARGUMENT error is returned. + */ + // const maxResultCount = 1234 + /** + * Required. The region to search. + */ + // const locationRestriction = {} + /** + * How results will be ranked in the response. + */ + // const rankPreference = {} + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callSearchNearby() { + // Construct request + const request = { + locationRestriction, + }; + + // Run request + const response = await placesClient.searchNearby(request); + console.log(response); + } + + callSearchNearby(); + // [END places_v1_generated_Places_SearchNearby_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js new file mode 100644 index 00000000000..c219bf23c12 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js @@ -0,0 +1,137 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(textQuery) { + // [START places_v1_generated_Places_SearchText_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The text query for textual search. + */ + // const textQuery = 'abc123' + /** + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + */ + // const languageCode = 'abc123' + /** + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * Note that 3-digit region codes are not currently supported. + */ + // const regionCode = 'abc123' + /** + * How results will be ranked in the response. + */ + // const rankPreference = {} + /** + * The requested place type. Full list of types supported: + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * Only support one included type. + */ + // const includedType = 'abc123' + /** + * Used to restrict the search to places that are currently open. The default + * is false. + */ + // const openNow = true + /** + * Filter out results whose average user rating is strictly less than this + * limit. A valid value must be a float between 0 and 5 (inclusively) at a + * 0.5 cadence i.e. 0, 0.5, 1.0, ... , 5.0 inclusively. The input rating + * will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 + * will eliminate all results with a less than 1.0 rating. + */ + // const minRating = 1234 + /** + * Maximum number of results to return. It must be between 1 and 20, + * inclusively. The default is 20. If the number is unset, it falls back to + * the upper limit. If the number is set to negative or exceeds the upper + * limit, an INVALID_ARGUMENT error is returned. + */ + // const maxResultCount = 1234 + /** + * Used to restrict the search to places that are marked as certain price + * levels. Users can choose any combinations of price levels. Default to + * select all price levels. + */ + // const priceLevels = [1,2,3,4] + /** + * Used to set strict type filtering for included_type. If set to true, only + * results of the same type will be returned. Default to false. + */ + // const strictTypeFiltering = true + /** + * The region to search. This location serves as a bias which means results + * around given location might be returned. Cannot be set along with + * location_restriction. + */ + // const locationBias = {} + /** + * The region to search. This location serves as a restriction which means + * results outside given location will not be returned. Cannot be set along + * with location_bias. + */ + // const locationRestriction = {} + /** + * Optional. Set the searchable EV options of a place search request. + */ + // const evOptions = {} + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callSearchText() { + // Construct request + const request = { + textQuery, + }; + + // Run request + const response = await placesClient.searchText(request); + console.log(response); + } + + callSearchText(); + // [END places_v1_generated_Places_SearchText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json new file mode 100644 index 00000000000..b6c8447a828 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json @@ -0,0 +1,359 @@ +{ + "clientLibrary": { + "name": "nodejs-places", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.maps.places.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "places_v1_generated_Places_SearchNearby_async", + "title": "Places searchNearby Sample", + "origin": "API_DEFINITION", + "description": " Search for places near locations.", + "canonical": true, + "file": "places.search_nearby.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 152, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchNearby", + "fullName": "google.maps.places.v1.Places.SearchNearby", + "async": true, + "parameters": [ + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "region_code", + "type": "TYPE_STRING" + }, + { + "name": "included_types", + "type": "TYPE_STRING[]" + }, + { + "name": "excluded_types", + "type": "TYPE_STRING[]" + }, + { + "name": "included_primary_types", + "type": "TYPE_STRING[]" + }, + { + "name": "excluded_primary_types", + "type": "TYPE_STRING[]" + }, + { + "name": "max_result_count", + "type": "TYPE_INT32" + }, + { + "name": "location_restriction", + "type": ".google.maps.places.v1.SearchNearbyRequest.LocationRestriction" + }, + { + "name": "rank_preference", + "type": ".google.maps.places.v1.SearchNearbyRequest.RankPreference" + } + ], + "resultType": ".google.maps.places.v1.SearchNearbyResponse", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "SearchNearby", + "fullName": "google.maps.places.v1.Places.SearchNearby", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + }, + { + "regionTag": "places_v1_generated_Places_SearchText_async", + "title": "Places searchText Sample", + "origin": "API_DEFINITION", + "description": " Text query based place search.", + "canonical": true, + "file": "places.search_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 129, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchText", + "fullName": "google.maps.places.v1.Places.SearchText", + "async": true, + "parameters": [ + { + "name": "text_query", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "region_code", + "type": "TYPE_STRING" + }, + { + "name": "rank_preference", + "type": ".google.maps.places.v1.SearchTextRequest.RankPreference" + }, + { + "name": "included_type", + "type": "TYPE_STRING" + }, + { + "name": "open_now", + "type": "TYPE_BOOL" + }, + { + "name": "min_rating", + "type": "TYPE_DOUBLE" + }, + { + "name": "max_result_count", + "type": "TYPE_INT32" + }, + { + "name": "price_levels", + "type": "TYPE_ENUM[]" + }, + { + "name": "strict_type_filtering", + "type": "TYPE_BOOL" + }, + { + "name": "location_bias", + "type": ".google.maps.places.v1.SearchTextRequest.LocationBias" + }, + { + "name": "location_restriction", + "type": ".google.maps.places.v1.SearchTextRequest.LocationRestriction" + }, + { + "name": "ev_options", + "type": ".google.maps.places.v1.SearchTextRequest.EVOptions" + } + ], + "resultType": ".google.maps.places.v1.SearchTextResponse", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "SearchText", + "fullName": "google.maps.places.v1.Places.SearchText", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + }, + { + "regionTag": "places_v1_generated_Places_GetPhotoMedia_async", + "title": "Places getPhotoMedia Sample", + "origin": "API_DEFINITION", + "description": " Get a photo media with a photo reference string.", + "canonical": true, + "file": "places.get_photo_media.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPhotoMedia", + "fullName": "google.maps.places.v1.Places.GetPhotoMedia", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "max_width_px", + "type": "TYPE_INT32" + }, + { + "name": "max_height_px", + "type": "TYPE_INT32" + }, + { + "name": "skip_http_redirect", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.maps.places.v1.PhotoMedia", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "GetPhotoMedia", + "fullName": "google.maps.places.v1.Places.GetPhotoMedia", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + }, + { + "regionTag": "places_v1_generated_Places_GetPlace_async", + "title": "Places getPlace Sample", + "origin": "API_DEFINITION", + "description": " Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format.", + "canonical": true, + "file": "places.get_place.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPlace", + "fullName": "google.maps.places.v1.Places.GetPlace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "region_code", + "type": "TYPE_STRING" + }, + { + "name": "session_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.maps.places.v1.Place", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "GetPlace", + "fullName": "google.maps.places.v1.Places.GetPlace", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + }, + { + "regionTag": "places_v1_generated_Places_AutocompletePlaces_async", + "title": "Places autocompletePlaces Sample", + "origin": "API_DEFINITION", + "description": " Returns predictions for the given input.", + "canonical": true, + "file": "places.autocomplete_places.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 143, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AutocompletePlaces", + "fullName": "google.maps.places.v1.Places.AutocompletePlaces", + "async": true, + "parameters": [ + { + "name": "input", + "type": "TYPE_STRING" + }, + { + "name": "location_bias", + "type": ".google.maps.places.v1.AutocompletePlacesRequest.LocationBias" + }, + { + "name": "location_restriction", + "type": ".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction" + }, + { + "name": "included_primary_types", + "type": "TYPE_STRING[]" + }, + { + "name": "included_region_codes", + "type": "TYPE_STRING[]" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "region_code", + "type": "TYPE_STRING" + }, + { + "name": "origin", + "type": ".google.type.LatLng" + }, + { + "name": "input_offset", + "type": "TYPE_INT32" + }, + { + "name": "include_query_predictions", + "type": "TYPE_BOOL" + }, + { + "name": "session_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.maps.places.v1.AutocompletePlacesResponse", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "AutocompletePlaces", + "fullName": "google.maps.places.v1.Places.AutocompletePlaces", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-maps-places/v1/src/index.ts b/owl-bot-staging/google-maps-places/v1/src/index.ts new file mode 100644 index 00000000000..0b4b848a4f1 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +const PlacesClient = v1.PlacesClient; +type PlacesClient = v1.PlacesClient; +export {v1, PlacesClient}; +export default {v1, PlacesClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..29fa123faa9 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.maps.places.v1", + "libraryPackage": "@googlemaps/places", + "services": { + "Places": { + "clients": { + "grpc": { + "libraryClient": "PlacesClient", + "rpcs": { + "SearchNearby": { + "methods": [ + "searchNearby" + ] + }, + "SearchText": { + "methods": [ + "searchText" + ] + }, + "GetPhotoMedia": { + "methods": [ + "getPhotoMedia" + ] + }, + "GetPlace": { + "methods": [ + "getPlace" + ] + }, + "AutocompletePlaces": { + "methods": [ + "autocompletePlaces" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PlacesClient", + "rpcs": { + "SearchNearby": { + "methods": [ + "searchNearby" + ] + }, + "SearchText": { + "methods": [ + "searchText" + ] + }, + "GetPhotoMedia": { + "methods": [ + "getPhotoMedia" + ] + }, + "GetPlace": { + "methods": [ + "getPlace" + ] + }, + "AutocompletePlaces": { + "methods": [ + "autocompletePlaces" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/index.ts b/owl-bot-staging/google-maps-places/v1/src/v1/index.ts new file mode 100644 index 00000000000..15d80ec3383 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {PlacesClient} from './places_client'; diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts b/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts new file mode 100644 index 00000000000..96aa7f869b2 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts @@ -0,0 +1,1135 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/places_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './places_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service definition for the Places API. + * Note: every request (except for Autocomplete requests) requires a field mask + * set outside of the request proto (`all/*`, is not assumed). The field mask + * can be set via the HTTP header `X-Goog-FieldMask`. See: + * https://developers.google.com/maps/documentation/places/web-service/choose-fields + * @class + * @memberof v1 + */ +export class PlacesClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + placesStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PlacesClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new PlacesClient({fallback: true}, gax); + * ``` + */ + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PlacesClient; + if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { + throw new Error('Please set either universe_domain or universeDomain, but not both.'); + } + const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; + this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; + this._servicePath = 'places.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + photoPathTemplate: new this._gaxModule.PathTemplate( + 'places/{place}/photos/{photo}' + ), + photoMediaPathTemplate: new this._gaxModule.PathTemplate( + 'places/{place_id}/photos/{photo_reference}/media' + ), + placePathTemplate: new this._gaxModule.PathTemplate( + 'places/{place_id}' + ), + reviewPathTemplate: new this._gaxModule.PathTemplate( + 'places/{place}/reviews/{review}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.maps.places.v1.Places', gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.placesStub) { + return this.placesStub; + } + + // Put together the "service stub" for + // google.maps.places.v1.Places. + this.placesStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.maps.places.v1.Places') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.maps.places.v1.Places, + this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const placesStubMethods = + ['searchNearby', 'searchText', 'getPhotoMedia', 'getPlace', 'autocompletePlaces']; + for (const methodName of placesStubMethods) { + const callPromise = this.placesStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.placesStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'places.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); + } + return 'places.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return []; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Search for places near locations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.languageCode + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + * @param {string} request.regionCode + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * + * + * Note that 3-digit region codes are not currently supported. + * @param {string[]} request.includedTypes + * Included Place type (eg, "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * + * Up to 50 types from [Table + * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * + * If there are any conflicting types, i.e. a type appears in both + * included_types and excluded_types, an INVALID_ARGUMENT error is + * returned. + * + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = ["restaurant"], excluded_primary_types = + * ["restaurant"]}, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + * @param {string[]} request.excludedTypes + * Excluded Place type (eg, "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * + * Up to 50 types from [Table + * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * + * If the client provides both included_types (e.g. restaurant) and + * excluded_types (e.g. cafe), then the response should include places that + * are restaurant but not cafe. The response includes places that match at + * least one of the included_types and none of the excluded_types. + * + * If there are any conflicting types, i.e. a type appears in both + * included_types and excluded_types, an INVALID_ARGUMENT error is returned. + * + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = ["restaurant"], excluded_primary_types = + * ["restaurant"]}, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + * @param {string[]} request.includedPrimaryTypes + * Included primary Place type (e.g. "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * A place can only have a single primary type from the supported types table + * associated with it. + * + * Up to 50 types from [Table + * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * + * If there are any conflicting primary types, i.e. a type appears in both + * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + * error is returned. + * + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = ["restaurant"], excluded_primary_types = + * ["restaurant"]}, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + * @param {string[]} request.excludedPrimaryTypes + * Excluded primary Place type (e.g. "restaurant" or "gas_station") from + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * + * Up to 50 types from [Table + * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) + * may be specified. + * + * If there are any conflicting primary types, i.e. a type appears in both + * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT + * error is returned. + * + * If a Place type is specified with multiple type restrictions, only places + * that satisfy all of the restrictions are returned. For example, if we + * have {included_types = ["restaurant"], excluded_primary_types = + * ["restaurant"]}, the returned places provide "restaurant" + * related services but do not operate primarily as "restaurants". + * @param {number} request.maxResultCount + * Maximum number of results to return. It must be between 1 and 20 (default), + * inclusively. If the number is unset, it falls back to the upper limit. If + * the number is set to negative or exceeds the upper limit, an + * INVALID_ARGUMENT error is returned. + * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} request.locationRestriction + * Required. The region to search. + * @param {google.maps.places.v1.SearchNearbyRequest.RankPreference} request.rankPreference + * How results will be ranked in the response. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.maps.places.v1.SearchNearbyResponse|SearchNearbyResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/places.search_nearby.js + * region_tag:places_v1_generated_Places_SearchNearby_async + */ + searchNearby( + request?: protos.google.maps.places.v1.ISearchNearbyRequest, + options?: CallOptions): + Promise<[ + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|undefined, {}|undefined + ]>; + searchNearby( + request: protos.google.maps.places.v1.ISearchNearbyRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, + {}|null|undefined>): void; + searchNearby( + request: protos.google.maps.places.v1.ISearchNearbyRequest, + callback: Callback< + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, + {}|null|undefined>): void; + searchNearby( + request?: protos.google.maps.places.v1.ISearchNearbyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.maps.places.v1.ISearchNearbyResponse, + protos.google.maps.places.v1.ISearchNearbyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + this.initialize(); + return this.innerApiCalls.searchNearby(request, options, callback); + } +/** + * Text query based place search. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.textQuery + * Required. The text query for textual search. + * @param {string} request.languageCode + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + * @param {string} request.regionCode + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * + * + * Note that 3-digit region codes are not currently supported. + * @param {google.maps.places.v1.SearchTextRequest.RankPreference} request.rankPreference + * How results will be ranked in the response. + * @param {string} request.includedType + * The requested place type. Full list of types supported: + * https://developers.google.com/maps/documentation/places/web-service/place-types. + * Only support one included type. + * @param {boolean} request.openNow + * Used to restrict the search to places that are currently open. The default + * is false. + * @param {number} request.minRating + * Filter out results whose average user rating is strictly less than this + * limit. A valid value must be a float between 0 and 5 (inclusively) at a + * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating + * will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 + * will eliminate all results with a less than 1.0 rating. + * @param {number} request.maxResultCount + * Maximum number of results to return. It must be between 1 and 20, + * inclusively. The default is 20. If the number is unset, it falls back to + * the upper limit. If the number is set to negative or exceeds the upper + * limit, an INVALID_ARGUMENT error is returned. + * @param {number[]} request.priceLevels + * Used to restrict the search to places that are marked as certain price + * levels. Users can choose any combinations of price levels. Default to + * select all price levels. + * @param {boolean} request.strictTypeFiltering + * Used to set strict type filtering for included_type. If set to true, only + * results of the same type will be returned. Default to false. + * @param {google.maps.places.v1.SearchTextRequest.LocationBias} request.locationBias + * The region to search. This location serves as a bias which means results + * around given location might be returned. Cannot be set along with + * location_restriction. + * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} request.locationRestriction + * The region to search. This location serves as a restriction which means + * results outside given location will not be returned. Cannot be set along + * with location_bias. + * @param {google.maps.places.v1.SearchTextRequest.EVOptions} [request.evOptions] + * Optional. Set the searchable EV options of a place search request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.maps.places.v1.SearchTextResponse|SearchTextResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/places.search_text.js + * region_tag:places_v1_generated_Places_SearchText_async + */ + searchText( + request?: protos.google.maps.places.v1.ISearchTextRequest, + options?: CallOptions): + Promise<[ + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|undefined, {}|undefined + ]>; + searchText( + request: protos.google.maps.places.v1.ISearchTextRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|null|undefined, + {}|null|undefined>): void; + searchText( + request: protos.google.maps.places.v1.ISearchTextRequest, + callback: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|null|undefined, + {}|null|undefined>): void; + searchText( + request?: protos.google.maps.places.v1.ISearchTextRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + this.initialize(); + return this.innerApiCalls.searchText(request, options, callback); + } +/** + * Get a photo media with a photo reference string. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of a photo media in the format: + * `places/{place_id}/photos/{photo_reference}/media`. + * + * The resource name of a photo as returned in a Place object's `photos.name` + * field comes with the format + * `places/{place_id}/photos/{photo_reference}`. You need to append `/media` + * at the end of the photo resource to get the photo media resource name. + * @param {number} [request.maxWidthPx] + * Optional. Specifies the maximum desired width, in pixels, of the image. If + * the image is smaller than the values specified, the original image will be + * returned. If the image is larger in either dimension, it will be scaled to + * match the smaller of the two dimensions, restricted to its original aspect + * ratio. Both the max_height_px and max_width_px properties accept an integer + * between 1 and 4800, inclusively. If the value is not within the allowed + * range, an INVALID_ARGUMENT error will be returned. + * + * At least one of max_height_px or max_width_px needs to be specified. If + * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + * error will be returned. + * @param {number} [request.maxHeightPx] + * Optional. Specifies the maximum desired height, in pixels, of the image. If + * the image is smaller than the values specified, the original image will be + * returned. If the image is larger in either dimension, it will be scaled to + * match the smaller of the two dimensions, restricted to its original aspect + * ratio. Both the max_height_px and max_width_px properties accept an integer + * between 1 and 4800, inclusively. If the value is not within the allowed + * range, an INVALID_ARGUMENT error will be returned. + * + * At least one of max_height_px or max_width_px needs to be specified. If + * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT + * error will be returned. + * @param {boolean} [request.skipHttpRedirect] + * Optional. If set, skip the default HTTP redirect behavior and render a text + * format (for example, in JSON format for HTTP use case) response. If not + * set, an HTTP redirect will be issued to redirect the call to the image + * media. This option is ignored for non-HTTP requests. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.maps.places.v1.PhotoMedia|PhotoMedia}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/places.get_photo_media.js + * region_tag:places_v1_generated_Places_GetPhotoMedia_async + */ + getPhotoMedia( + request?: protos.google.maps.places.v1.IGetPhotoMediaRequest, + options?: CallOptions): + Promise<[ + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|undefined, {}|undefined + ]>; + getPhotoMedia( + request: protos.google.maps.places.v1.IGetPhotoMediaRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, + {}|null|undefined>): void; + getPhotoMedia( + request: protos.google.maps.places.v1.IGetPhotoMediaRequest, + callback: Callback< + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, + {}|null|undefined>): void; + getPhotoMedia( + request?: protos.google.maps.places.v1.IGetPhotoMediaRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.maps.places.v1.IPhotoMedia, + protos.google.maps.places.v1.IGetPhotoMediaRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getPhotoMedia(request, options, callback); + } +/** + * Get the details of a place based on its resource name, which is a string + * in the `places/{place_id}` format. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of a place, in the `places/{place_id}` format. + * @param {string} [request.languageCode] + * Optional. Place details will be displayed with the preferred language if + * available. + * + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + * @param {string} [request.regionCode] + * Optional. The Unicode country/region code (CLDR) of the location where the + * request is coming from. This parameter is used to display the place + * details, like region-specific place name, if available. The parameter can + * affect results based on applicable law. + * For more information, see + * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. + * + * + * Note that 3-digit region codes are not currently supported. + * @param {string} [request.sessionToken] + * Optional. A string which identifies an Autocomplete session for billing + * purposes. Must be a URL and filename safe base64 string with at most 36 + * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + * returned. + * + * The session begins when the user starts typing a query, and concludes when + * they select a place and a call to Place Details or Address Validation is + * made. Each session can have multiple queries, followed by one Place Details + * or Address Validation request. The credentials used for each request within + * a session must belong to the same Google Cloud Console project. Once a + * session has concluded, the token is no longer valid; your app must generate + * a fresh token for each session. If the `session_token` parameter is + * omitted, or if you reuse a session token, the session is charged as if no + * session token was provided (each request is billed separately). + * + * We recommend the following guidelines: + * + * * Use session tokens for all Place Autocomplete calls. + * * Generate a fresh token for each session. Using a version 4 UUID is + * recommended. + * * Ensure that the credentials used for all Place Autocomplete, Place + * Details, and Address Validation requests within a session belong to the + * same Cloud Console project. + * * Be sure to pass a unique session token for each new session. Using the + * same token for more than one session will result in each request being + * billed individually. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.maps.places.v1.Place|Place}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/places.get_place.js + * region_tag:places_v1_generated_Places_GetPlace_async + */ + getPlace( + request?: protos.google.maps.places.v1.IGetPlaceRequest, + options?: CallOptions): + Promise<[ + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|undefined, {}|undefined + ]>; + getPlace( + request: protos.google.maps.places.v1.IGetPlaceRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, + {}|null|undefined>): void; + getPlace( + request: protos.google.maps.places.v1.IGetPlaceRequest, + callback: Callback< + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, + {}|null|undefined>): void; + getPlace( + request?: protos.google.maps.places.v1.IGetPlaceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.maps.places.v1.IPlace, + protos.google.maps.places.v1.IGetPlaceRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getPlace(request, options, callback); + } +/** + * Returns predictions for the given input. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.input + * Required. The text string on which to search. + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} [request.locationBias] + * Optional. Bias results to a specified location. + * + * At most one of `location_bias` or `location_restriction` should be set. If + * neither are set, the results will be biased by IP address, meaning the IP + * address will be mapped to an imprecise location and used as a biasing + * signal. + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} [request.locationRestriction] + * Optional. Restrict results to a specified location. + * + * At most one of `location_bias` or `location_restriction` should be set. If + * neither are set, the results will be biased by IP address, meaning the IP + * address will be mapped to an imprecise location and used as a biasing + * signal. + * @param {string[]} [request.includedPrimaryTypes] + * Optional. Included primary Place type (for example, "restaurant" or + * "gas_station") in Place Types + * (https://developers.google.com/maps/documentation/places/web-service/place-types), + * or only `(regions)`, or only `(cities)`. A Place is only returned if its + * primary type is included in this list. Up to 5 values can be specified. If + * no types are specified, all Place types are returned. + * @param {string[]} [request.includedRegionCodes] + * Optional. Only include results in the specified regions, specified as up to + * 15 CLDR two-character region codes. An empty set will not restrict the + * results. If both `location_restriction` and `included_region_codes` are + * set, the results will be located in the area of intersection. + * @param {string} [request.languageCode] + * Optional. The language in which to return results. Defaults to en-US. The + * results may be in mixed languages if the language used in `input` is + * different from `language_code` or if the returned Place does not have a + * translation from the local language to `language_code`. + * @param {string} [request.regionCode] + * Optional. The region code, specified as a CLDR two-character region code. + * This affects address formatting, result ranking, and may influence what + * results are returned. This does not restrict results to the specified + * region. To restrict results to a region, use `region_code_restriction`. + * @param {google.type.LatLng} [request.origin] + * Optional. The origin point from which to calculate geodesic distance to the + * destination (returned as `distance_meters`). If this value is omitted, + * geodesic distance will not be returned. + * @param {number} [request.inputOffset] + * Optional. A zero-based Unicode character offset of `input` indicating the + * cursor position in `input`. The cursor position may influence what + * predictions are returned. + * + * If empty, defaults to the length of `input`. + * @param {boolean} [request.includeQueryPredictions] + * Optional. If true, the response will include both Place and query + * predictions. Otherwise the response will only return Place predictions. + * @param {string} [request.sessionToken] + * Optional. A string which identifies an Autocomplete session for billing + * purposes. Must be a URL and filename safe base64 string with at most 36 + * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is + * returned. + * + * The session begins when the user starts typing a query, and concludes when + * they select a place and a call to Place Details or Address Validation is + * made. Each session can have multiple queries, followed by one Place Details + * or Address Validation request. The credentials used for each request within + * a session must belong to the same Google Cloud Console project. Once a + * session has concluded, the token is no longer valid; your app must generate + * a fresh token for each session. If the `session_token` parameter is + * omitted, or if you reuse a session token, the session is charged as if no + * session token was provided (each request is billed separately). + * + * We recommend the following guidelines: + * + * * Use session tokens for all Place Autocomplete calls. + * * Generate a fresh token for each session. Using a version 4 UUID is + * recommended. + * * Ensure that the credentials used for all Place Autocomplete, Place + * Details, and Address Validation requests within a session belong to the + * same Cloud Console project. + * * Be sure to pass a unique session token for each new session. Using the + * same token for more than one session will result in each request being + * billed individually. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.maps.places.v1.AutocompletePlacesResponse|AutocompletePlacesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/places.autocomplete_places.js + * region_tag:places_v1_generated_Places_AutocompletePlaces_async + */ + autocompletePlaces( + request?: protos.google.maps.places.v1.IAutocompletePlacesRequest, + options?: CallOptions): + Promise<[ + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|undefined, {}|undefined + ]>; + autocompletePlaces( + request: protos.google.maps.places.v1.IAutocompletePlacesRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, + {}|null|undefined>): void; + autocompletePlaces( + request: protos.google.maps.places.v1.IAutocompletePlacesRequest, + callback: Callback< + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, + {}|null|undefined>): void; + autocompletePlaces( + request?: protos.google.maps.places.v1.IAutocompletePlacesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.maps.places.v1.IAutocompletePlacesResponse, + protos.google.maps.places.v1.IAutocompletePlacesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + this.initialize(); + return this.innerApiCalls.autocompletePlaces(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified photo resource name string. + * + * @param {string} place + * @param {string} photo + * @returns {string} Resource name string. + */ + photoPath(place:string,photo:string) { + return this.pathTemplates.photoPathTemplate.render({ + place: place, + photo: photo, + }); + } + + /** + * Parse the place from Photo resource. + * + * @param {string} photoName + * A fully-qualified path representing Photo resource. + * @returns {string} A string representing the place. + */ + matchPlaceFromPhotoName(photoName: string) { + return this.pathTemplates.photoPathTemplate.match(photoName).place; + } + + /** + * Parse the photo from Photo resource. + * + * @param {string} photoName + * A fully-qualified path representing Photo resource. + * @returns {string} A string representing the photo. + */ + matchPhotoFromPhotoName(photoName: string) { + return this.pathTemplates.photoPathTemplate.match(photoName).photo; + } + + /** + * Return a fully-qualified photoMedia resource name string. + * + * @param {string} place_id + * @param {string} photo_reference + * @returns {string} Resource name string. + */ + photoMediaPath(placeId:string,photoReference:string) { + return this.pathTemplates.photoMediaPathTemplate.render({ + place_id: placeId, + photo_reference: photoReference, + }); + } + + /** + * Parse the place_id from PhotoMedia resource. + * + * @param {string} photoMediaName + * A fully-qualified path representing PhotoMedia resource. + * @returns {string} A string representing the place_id. + */ + matchPlaceIdFromPhotoMediaName(photoMediaName: string) { + return this.pathTemplates.photoMediaPathTemplate.match(photoMediaName).place_id; + } + + /** + * Parse the photo_reference from PhotoMedia resource. + * + * @param {string} photoMediaName + * A fully-qualified path representing PhotoMedia resource. + * @returns {string} A string representing the photo_reference. + */ + matchPhotoReferenceFromPhotoMediaName(photoMediaName: string) { + return this.pathTemplates.photoMediaPathTemplate.match(photoMediaName).photo_reference; + } + + /** + * Return a fully-qualified place resource name string. + * + * @param {string} place_id + * @returns {string} Resource name string. + */ + placePath(placeId:string) { + return this.pathTemplates.placePathTemplate.render({ + place_id: placeId, + }); + } + + /** + * Parse the place_id from Place resource. + * + * @param {string} placeName + * A fully-qualified path representing Place resource. + * @returns {string} A string representing the place_id. + */ + matchPlaceIdFromPlaceName(placeName: string) { + return this.pathTemplates.placePathTemplate.match(placeName).place_id; + } + + /** + * Return a fully-qualified review resource name string. + * + * @param {string} place + * @param {string} review + * @returns {string} Resource name string. + */ + reviewPath(place:string,review:string) { + return this.pathTemplates.reviewPathTemplate.render({ + place: place, + review: review, + }); + } + + /** + * Parse the place from Review resource. + * + * @param {string} reviewName + * A fully-qualified path representing Review resource. + * @returns {string} A string representing the place. + */ + matchPlaceFromReviewName(reviewName: string) { + return this.pathTemplates.reviewPathTemplate.match(reviewName).place; + } + + /** + * Parse the review from Review resource. + * + * @param {string} reviewName + * A fully-qualified path representing Review resource. + * @returns {string} A string representing the review. + */ + matchReviewFromReviewName(reviewName: string) { + return this.pathTemplates.reviewPathTemplate.match(reviewName).review; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.placesStub && !this._terminated) { + return this.placesStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json b/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json new file mode 100644 index 00000000000..08c314b2f81 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.maps.places.v1.Places": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "SearchNearby": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SearchText": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPhotoMedia": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPlace": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AutocompletePlaces": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json b/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json new file mode 100644 index 00000000000..241d296eaac --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json @@ -0,0 +1,14 @@ +[ + "../../protos/google/geo/type/viewport.proto", + "../../protos/google/maps/places/v1/attribution.proto", + "../../protos/google/maps/places/v1/content_block.proto", + "../../protos/google/maps/places/v1/contextual_content.proto", + "../../protos/google/maps/places/v1/ev_charging.proto", + "../../protos/google/maps/places/v1/fuel_options.proto", + "../../protos/google/maps/places/v1/geometry.proto", + "../../protos/google/maps/places/v1/photo.proto", + "../../protos/google/maps/places/v1/place.proto", + "../../protos/google/maps/places/v1/places_service.proto", + "../../protos/google/maps/places/v1/reference.proto", + "../../protos/google/maps/places/v1/review.proto" +] diff --git a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..43116c49ac8 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const places = require('@googlemaps/places'); + +function main() { + const placesClient = new places.PlacesClient(); +} + +main(); diff --git a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d47881e4df6 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {PlacesClient} from '@googlemaps/places'; + +// check that the client class type name can be used +function doStuffWithPlacesClient(client: PlacesClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const placesClient = new PlacesClient(); + doStuffWithPlacesClient(placesClient); +} + +main(); diff --git a/owl-bot-staging/google-maps-places/v1/system-test/install.ts b/owl-bot-staging/google-maps-places/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts b/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts new file mode 100644 index 00000000000..8ac58f0cb36 --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts @@ -0,0 +1,802 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as placesModule from '../src'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1.PlacesClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new placesModule.v1.PlacesClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'places.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new placesModule.v1.PlacesClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, "googleapis.com"); + }); + + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = placesModule.v1.PlacesClient.servicePath; + assert.strictEqual(servicePath, 'places.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = placesModule.v1.PlacesClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'places.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new placesModule.v1.PlacesClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'places.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new placesModule.v1.PlacesClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'places.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new placesModule.v1.PlacesClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'places.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new placesModule.v1.PlacesClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'places.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { new placesModule.v1.PlacesClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = placesModule.v1.PlacesClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new placesModule.v1.PlacesClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new placesModule.v1.PlacesClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.placesStub, undefined); + await client.initialize(); + assert(client.placesStub); + }); + + it('has close method for the initialized client', done => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.placesStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.placesStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error|null, projectId?: string|null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('searchNearby', () => { + it('invokes searchNearby without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyResponse() + ); + client.innerApiCalls.searchNearby = stubSimpleCall(expectedResponse); + const [response] = await client.searchNearby(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchNearby without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyResponse() + ); + client.innerApiCalls.searchNearby = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchNearby( + request, + (err?: Error|null, result?: protos.google.maps.places.v1.ISearchNearbyResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchNearby with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.searchNearby = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.searchNearby(request), expectedError); + }); + + it('invokes searchNearby with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchNearbyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.searchNearby(request), expectedError); + }); + }); + + describe('searchText', () => { + it('invokes searchText without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextResponse() + ); + client.innerApiCalls.searchText = stubSimpleCall(expectedResponse); + const [response] = await client.searchText(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchText without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextResponse() + ); + client.innerApiCalls.searchText = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchText( + request, + (err?: Error|null, result?: protos.google.maps.places.v1.ISearchTextResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchText with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.searchText = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.searchText(request), expectedError); + }); + + it('invokes searchText with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.searchText(request), expectedError); + }); + }); + + describe('getPhotoMedia', () => { + it('invokes getPhotoMedia without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPhotoMediaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.PhotoMedia() + ); + client.innerApiCalls.getPhotoMedia = stubSimpleCall(expectedResponse); + const [response] = await client.getPhotoMedia(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhotoMedia without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPhotoMediaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.PhotoMedia() + ); + client.innerApiCalls.getPhotoMedia = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPhotoMedia( + request, + (err?: Error|null, result?: protos.google.maps.places.v1.IPhotoMedia|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhotoMedia with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPhotoMediaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPhotoMedia = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPhotoMedia(request), expectedError); + const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhotoMedia with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPhotoMediaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPhotoMedia(request), expectedError); + }); + }); + + describe('getPlace', () => { + it('invokes getPlace without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPlaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.Place() + ); + client.innerApiCalls.getPlace = stubSimpleCall(expectedResponse); + const [response] = await client.getPlace(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlace without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPlaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.Place() + ); + client.innerApiCalls.getPlace = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPlace( + request, + (err?: Error|null, result?: protos.google.maps.places.v1.IPlace|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlace with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPlaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPlace = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getPlace(request), expectedError); + const actualRequest = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPlace with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.GetPlaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPlace(request), expectedError); + }); + }); + + describe('autocompletePlaces', () => { + it('invokes autocompletePlaces without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesResponse() + ); + client.innerApiCalls.autocompletePlaces = stubSimpleCall(expectedResponse); + const [response] = await client.autocompletePlaces(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes autocompletePlaces without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesResponse() + ); + client.innerApiCalls.autocompletePlaces = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.autocompletePlaces( + request, + (err?: Error|null, result?: protos.google.maps.places.v1.IAutocompletePlacesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes autocompletePlaces with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.autocompletePlaces = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.autocompletePlaces(request), expectedError); + }); + + it('invokes autocompletePlaces with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.AutocompletePlacesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.autocompletePlaces(request), expectedError); + }); + }); + + describe('Path templates', () => { + + describe('photo', () => { + const fakePath = "/rendered/path/photo"; + const expectedParameters = { + place: "placeValue", + photo: "photoValue", + }; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.photoPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.photoPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('photoPath', () => { + const result = client.photoPath("placeValue", "photoValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.photoPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPlaceFromPhotoName', () => { + const result = client.matchPlaceFromPhotoName(fakePath); + assert.strictEqual(result, "placeValue"); + assert((client.pathTemplates.photoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPhotoFromPhotoName', () => { + const result = client.matchPhotoFromPhotoName(fakePath); + assert.strictEqual(result, "photoValue"); + assert((client.pathTemplates.photoPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('photoMedia', () => { + const fakePath = "/rendered/path/photoMedia"; + const expectedParameters = { + place_id: "placeIdValue", + photo_reference: "photoReferenceValue", + }; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.photoMediaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.photoMediaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('photoMediaPath', () => { + const result = client.photoMediaPath("placeIdValue", "photoReferenceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.photoMediaPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPlaceIdFromPhotoMediaName', () => { + const result = client.matchPlaceIdFromPhotoMediaName(fakePath); + assert.strictEqual(result, "placeIdValue"); + assert((client.pathTemplates.photoMediaPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPhotoReferenceFromPhotoMediaName', () => { + const result = client.matchPhotoReferenceFromPhotoMediaName(fakePath); + assert.strictEqual(result, "photoReferenceValue"); + assert((client.pathTemplates.photoMediaPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('place', () => { + const fakePath = "/rendered/path/place"; + const expectedParameters = { + place_id: "placeIdValue", + }; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.placePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.placePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('placePath', () => { + const result = client.placePath("placeIdValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.placePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPlaceIdFromPlaceName', () => { + const result = client.matchPlaceIdFromPlaceName(fakePath); + assert.strictEqual(result, "placeIdValue"); + assert((client.pathTemplates.placePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('review', () => { + const fakePath = "/rendered/path/review"; + const expectedParameters = { + place: "placeValue", + review: "reviewValue", + }; + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reviewPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.reviewPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('reviewPath', () => { + const result = client.reviewPath("placeValue", "reviewValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.reviewPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchPlaceFromReviewName', () => { + const result = client.matchPlaceFromReviewName(fakePath); + assert.strictEqual(result, "placeValue"); + assert((client.pathTemplates.reviewPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchReviewFromReviewName', () => { + const result = client.matchReviewFromReviewName(fakePath); + assert.strictEqual(result, "reviewValue"); + assert((client.pathTemplates.reviewPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-maps-places/v1/tsconfig.json b/owl-bot-staging/google-maps-places/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-maps-places/v1/webpack.config.js b/owl-bot-staging/google-maps-places/v1/webpack.config.js new file mode 100644 index 00000000000..6f1933d317a --- /dev/null +++ b/owl-bot-staging/google-maps-places/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'Places', + filename: './places.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 902fe600076bf55b93597053fb34cb4e58f80354 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 17 May 2024 19:05:15 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-maps-places/v1/.eslintignore | 7 - .../google-maps-places/v1/.eslintrc.json | 3 - .../google-maps-places/v1/.gitignore | 14 - .../google-maps-places/v1/.jsdoc.js | 55 - .../google-maps-places/v1/.mocharc.js | 33 - .../google-maps-places/v1/.prettierrc.js | 22 - .../google-maps-places/v1/README.md | 1 - .../google-maps-places/v1/package.json | 58 - .../v1/protos/google/geo/type/viewport.proto | 69 - .../google/maps/places/v1/attribution.proto | 44 - .../google/maps/places/v1/ev_charging.proto | 111 - .../google/maps/places/v1/fuel_options.proto | 109 - .../google/maps/places/v1/geometry.proto | 42 - .../protos/google/maps/places/v1/photo.proto | 54 - .../protos/google/maps/places/v1/place.proto | 584 - .../maps/places/v1/places_service.proto | 772 - .../protos/google/maps/places/v1/review.proto | 65 - .../google-maps-places/v1/protos/protos.d.ts | 13421 ---- .../google-maps-places/v1/protos/protos.js | 36611 --------- .../google-maps-places/v1/protos/protos.json | 3848 - .../v1/places.autocomplete_places.js | 151 - .../generated/v1/places.get_photo_media.js | 99 - .../samples/generated/v1/places.get_place.js | 104 - .../generated/v1/places.search_nearby.js | 160 - .../generated/v1/places.search_text.js | 137 - ...nippet_metadata_google.maps.places.v1.json | 359 - .../google-maps-places/v1/src/index.ts | 25 - .../v1/src/v1/gapic_metadata.json | 73 - .../google-maps-places/v1/src/v1/index.ts | 19 - .../v1/src/v1/places_client.ts | 1135 - .../v1/src/v1/places_client_config.json | 46 - .../v1/src/v1/places_proto_list.json | 14 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_places_v1.ts | 802 - .../google-maps-places/v1/tsconfig.json | 19 - .../google-maps-places/v1/webpack.config.js | 64 - .../google/maps/places/v1/content_block.proto | 0 .../maps/places/v1/contextual_content.proto | 0 .../protos/google/maps/places/v1/place.proto | 43 + .../maps/places/v1/places_service.proto | 24 +- .../google/maps/places/v1/reference.proto | 0 .../google-maps-places/protos/protos.d.ts | 18729 ++--- packages/google-maps-places/protos/protos.js | 61101 ++++++++-------- .../google-maps-places/protos/protos.json | 4711 +- .../v1/places.autocomplete_places.js | 10 +- .../src/v1/places_client.ts | 10 +- .../src/v1/places_proto_list.json | 3 + 49 files changed, 44297 insertions(+), 99572 deletions(-) delete mode 100644 owl-bot-staging/google-maps-places/v1/.eslintignore delete mode 100644 owl-bot-staging/google-maps-places/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-maps-places/v1/.gitignore delete mode 100644 owl-bot-staging/google-maps-places/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-maps-places/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-maps-places/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-maps-places/v1/README.md delete mode 100644 owl-bot-staging/google-maps-places/v1/package.json delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-maps-places/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js delete mode 100644 owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json delete mode 100644 owl-bot-staging/google-maps-places/v1/src/index.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json delete mode 100644 owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json delete mode 100644 owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts delete mode 100644 owl-bot-staging/google-maps-places/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-maps-places/v1/webpack.config.js rename {owl-bot-staging/google-maps-places/v1 => packages/google-maps-places}/protos/google/maps/places/v1/content_block.proto (100%) rename {owl-bot-staging/google-maps-places/v1 => packages/google-maps-places}/protos/google/maps/places/v1/contextual_content.proto (100%) rename {owl-bot-staging/google-maps-places/v1 => packages/google-maps-places}/protos/google/maps/places/v1/reference.proto (100%) diff --git a/owl-bot-staging/google-maps-places/v1/.eslintignore b/owl-bot-staging/google-maps-places/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-maps-places/v1/.eslintrc.json b/owl-bot-staging/google-maps-places/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-maps-places/v1/.gitignore b/owl-bot-staging/google-maps-places/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-maps-places/v1/.jsdoc.js b/owl-bot-staging/google-maps-places/v1/.jsdoc.js deleted file mode 100644 index acb85480da6..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@googlemaps/places', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-maps-places/v1/.mocharc.js b/owl-bot-staging/google-maps-places/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-maps-places/v1/.prettierrc.js b/owl-bot-staging/google-maps-places/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-maps-places/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -module.exports = { - ...require('gts/.prettierrc.json') -} diff --git a/owl-bot-staging/google-maps-places/v1/README.md b/owl-bot-staging/google-maps-places/v1/README.md deleted file mode 100644 index 0e091236257..00000000000 --- a/owl-bot-staging/google-maps-places/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Places: Nodejs Client diff --git a/owl-bot-staging/google-maps-places/v1/package.json b/owl-bot-staging/google-maps-places/v1/package.json deleted file mode 100644 index f61e3b41190..00000000000 --- a/owl-bot-staging/google-maps-places/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@googlemaps/places", - "version": "0.1.0", - "description": "Places client for Node.js", - "repository": "googleapis/nodejs-places", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google places", - "places", - "places" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.3" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto b/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto deleted file mode 100644 index df68a324055..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/geo/type/viewport.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.geo.type; - -import "google/type/latlng.proto"; - -option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport"; -option java_multiple_files = true; -option java_outer_classname = "ViewportProto"; -option java_package = "com.google.geo.type"; -option objc_class_prefix = "GGTP"; - -// A latitude-longitude viewport, represented as two diagonally opposite `low` -// and `high` points. A viewport is considered a closed region, i.e. it includes -// its boundary. The latitude bounds must range between -90 to 90 degrees -// inclusive, and the longitude bounds must range between -180 to 180 degrees -// inclusive. Various cases include: -// -// - If `low` = `high`, the viewport consists of that single point. -// -// - If `low.longitude` > `high.longitude`, the longitude range is inverted -// (the viewport crosses the 180 degree longitude line). -// -// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, -// the viewport includes all longitudes. -// -// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, -// the longitude range is empty. -// -// - If `low.latitude` > `high.latitude`, the latitude range is empty. -// -// Both `low` and `high` must be populated, and the represented box cannot be -// empty (as specified by the definitions above). An empty viewport will result -// in an error. -// -// For example, this viewport fully encloses New York City: -// -// { -// "low": { -// "latitude": 40.477398, -// "longitude": -74.259087 -// }, -// "high": { -// "latitude": 40.91618, -// "longitude": -73.70018 -// } -// } -message Viewport { - // Required. The low point of the viewport. - google.type.LatLng low = 1; - - // Required. The high point of the viewport. - google.type.LatLng high = 2; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto deleted file mode 100644 index 481ce202499..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/attribution.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "AttributionProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Information about the author of the UGC data. Used in -// [Photo][google.maps.places.v1.Photo], and -// [Review][google.maps.places.v1.Review]. -message AuthorAttribution { - // Name of the author of the [Photo][google.maps.places.v1.Photo] or - // [Review][google.maps.places.v1.Review]. - string display_name = 1; - - // URI of the author of the [Photo][google.maps.places.v1.Photo] or - // [Review][google.maps.places.v1.Review]. - string uri = 2; - - // Profile photo URI of the author of the - // [Photo][google.maps.places.v1.Photo] or - // [Review][google.maps.places.v1.Review]. - string photo_uri = 3; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto deleted file mode 100644 index 80db0cb76e8..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/ev_charging.proto +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "EvChargingProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Information about the EV Charge Station hosted in Place. -// Terminology follows -// https://afdc.energy.gov/fuels/electricity_infrastructure.html One port -// could charge one car at a time. One port has one or more connectors. One -// station has one or more ports. -message EVChargeOptions { - // EV charging information grouped by [type, max_charge_rate_kw]. - // Shows EV charge aggregation of connectors that have the same type and max - // charge rate in kw. - message ConnectorAggregation { - // The connector type of this aggregation. - EVConnectorType type = 1; - - // The static max charging rate in kw of each connector in the aggregation. - double max_charge_rate_kw = 2; - - // Number of connectors in this aggregation. - int32 count = 3; - - // Number of connectors in this aggregation that are currently available. - optional int32 available_count = 4; - - // Number of connectors in this aggregation that are currently out of - // service. - optional int32 out_of_service_count = 5; - - // The timestamp when the connector availability information in this - // aggregation was last updated. - google.protobuf.Timestamp availability_last_update_time = 6; - } - - // Number of connectors at this station. However, because some ports can have - // multiple connectors but only be able to charge one car at a time (e.g.) the - // number of connectors may be greater than the total number of cars which can - // charge simultaneously. - int32 connector_count = 1; - - // A list of EV charging connector aggregations that contain connectors of the - // same type and same charge rate. - repeated ConnectorAggregation connector_aggregation = 2; -} - -// See http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 for -// additional information/context on EV charging connector types. -enum EVConnectorType { - // Unspecified connector. - EV_CONNECTOR_TYPE_UNSPECIFIED = 0; - - // Other connector types. - EV_CONNECTOR_TYPE_OTHER = 1; - - // J1772 type 1 connector. - EV_CONNECTOR_TYPE_J1772 = 2; - - // IEC 62196 type 2 connector. Often referred to as MENNEKES. - EV_CONNECTOR_TYPE_TYPE_2 = 3; - - // CHAdeMO type connector. - EV_CONNECTOR_TYPE_CHADEMO = 4; - - // Combined Charging System (AC and DC). Based on SAE. - // Type-1 J-1772 connector - EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5; - - // Combined Charging System (AC and DC). Based on Type-2 - // Mennekes connector - EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6; - - // The generic TESLA connector. This is NACS in the North America but can be - // non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). - // This value is less representative of an actual connector type, and more - // represents the ability to charge a Tesla brand vehicle at a Tesla owned - // charging station. - EV_CONNECTOR_TYPE_TESLA = 7; - - // GB/T type corresponds to the GB/T standard in China. This type covers all - // GB_T types. - EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8; - - // Unspecified wall outlet. - EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto deleted file mode 100644 index c0e6e9900eb..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/fuel_options.proto +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/protobuf/timestamp.proto"; -import "google/type/money.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "FuelOptionsProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// The most recent information about fuel options in a gas station. This -// information is updated regularly. -message FuelOptions { - // Fuel price information for a given type. - message FuelPrice { - // Types of fuel. - enum FuelType { - // Unspecified fuel type. - FUEL_TYPE_UNSPECIFIED = 0; - - // Diesel fuel. - DIESEL = 1; - - // Regular unleaded. - REGULAR_UNLEADED = 2; - - // Midgrade. - MIDGRADE = 3; - - // Premium. - PREMIUM = 4; - - // SP 91. - SP91 = 5; - - // SP 91 E10. - SP91_E10 = 6; - - // SP 92. - SP92 = 7; - - // SP 95. - SP95 = 8; - - // SP95 E10. - SP95_E10 = 9; - - // SP 98. - SP98 = 10; - - // SP 99. - SP99 = 11; - - // SP 100. - SP100 = 12; - - // LPG. - LPG = 13; - - // E 80. - E80 = 14; - - // E 85. - E85 = 15; - - // Methane. - METHANE = 16; - - // Bio-diesel. - BIO_DIESEL = 17; - - // Truck diesel. - TRUCK_DIESEL = 18; - } - - // The type of fuel. - FuelType type = 1; - - // The price of the fuel. - google.type.Money price = 2; - - // The time the fuel price was last updated. - google.protobuf.Timestamp update_time = 3; - } - - // The last known fuel price for each type of fuel this station has. There is - // one entry per fuel type this station has. Order is not important. - repeated FuelPrice fuel_prices = 1; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto deleted file mode 100644 index 92ebd887a24..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/geometry.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/api/field_behavior.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "GeometryProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Circle with a LatLng as center and radius. -message Circle { - // Required. Center latitude and longitude. - // - // The range of latitude must be within [-90.0, 90.0]. The range of the - // longitude must be within [-180.0, 180.0]. - google.type.LatLng center = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Radius measured in meters. The radius must be within [0.0, - // 50000.0]. - double radius = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto deleted file mode 100644 index b340dce98e9..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/photo.proto +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/maps/places/v1/attribution.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "PhotoProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Information about a photo of a place. -message Photo { - option (google.api.resource) = { - type: "places.googleapis.com/Photo" - pattern: "places/{place}/photos/{photo}" - plural: "photos" - singular: "photo" - }; - - // Identifier. A reference representing this place photo which may be used to - // look up this place photo again (also called the API "resource" name: - // `places/{place_id}/photos/{photo}`). - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The maximum available width, in pixels. - int32 width_px = 2; - - // The maximum available height, in pixels. - int32 height_px = 3; - - // This photo's authors. - repeated AuthorAttribution author_attributions = 4; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto deleted file mode 100644 index 47e8206acce..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/place.proto +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/api/resource.proto"; -import "google/geo/type/viewport.proto"; -import "google/maps/places/v1/content_block.proto"; -import "google/maps/places/v1/ev_charging.proto"; -import "google/maps/places/v1/fuel_options.proto"; -import "google/maps/places/v1/photo.proto"; -import "google/maps/places/v1/reference.proto"; -import "google/maps/places/v1/review.proto"; -import "google/type/date.proto"; -import "google/type/latlng.proto"; -import "google/type/localized_text.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "PlaceProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// All the information representing a Place. -message Place { - option (google.api.resource) = { - type: "places.googleapis.com/Place" - pattern: "places/{place_id}" - plural: "places" - singular: "place" - }; - - // The structured components that form the formatted address, if this - // information is available. - message AddressComponent { - // The full text description or name of the address component. For example, - // an address component for the country Australia may have a long_name of - // "Australia". - string long_text = 1; - - // An abbreviated textual name for the address component, if available. For - // example, an address component for the country of Australia may have a - // short_name of "AU". - string short_text = 2; - - // An array indicating the type(s) of the address component. - repeated string types = 3; - - // The language used to format this components, in CLDR notation. - string language_code = 4; - } - - // Plus code (http://plus.codes) is a location reference with two formats: - // global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, - // and compound code, replacing the prefix with a reference location. - message PlusCode { - // Place's global (full) code, such as "9FWM33GV+HQ", representing an - // 1/8000 by 1/8000 degree area (~14 by 14 meters). - string global_code = 1; - - // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing - // the suffix of the global code and replacing the prefix with a formatted - // name of a reference entity. - string compound_code = 2; - } - - // Information about business hour of the place. - message OpeningHours { - // A period the place remains in open_now status. - message Period { - // Status changing points. - message Point { - // A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is - // Monday, etc. - optional int32 day = 1; - - // The hour in 2 digits. Ranges from 00 to 23. - optional int32 hour = 2; - - // The minute in 2 digits. Ranges from 00 to 59. - optional int32 minute = 3; - - // Date in the local timezone for the place. - google.type.Date date = 6; - - // Whether or not this endpoint was truncated. Truncation occurs when - // the real hours are outside the times we are willing to return hours - // between, so we truncate the hours back to these boundaries. This - // ensures that at most 24 * 7 hours from midnight of the day of the - // request are returned. - bool truncated = 5; - } - - // The time that the place starts to be open. - Point open = 1; - - // The time that the place starts to be closed. - Point close = 2; - } - - // A type used to identify the type of secondary hours. - enum SecondaryHoursType { - // Default value when secondary hour type is not specified. - SECONDARY_HOURS_TYPE_UNSPECIFIED = 0; - - // The drive-through hour for banks, restaurants, or pharmacies. - DRIVE_THROUGH = 1; - - // The happy hour. - HAPPY_HOUR = 2; - - // The delivery hour. - DELIVERY = 3; - - // The takeout hour. - TAKEOUT = 4; - - // The kitchen hour. - KITCHEN = 5; - - // The breakfast hour. - BREAKFAST = 6; - - // The lunch hour. - LUNCH = 7; - - // The dinner hour. - DINNER = 8; - - // The brunch hour. - BRUNCH = 9; - - // The pickup hour. - PICKUP = 10; - - // The access hours for storage places. - ACCESS = 11; - - // The special hours for seniors. - SENIOR_HOURS = 12; - - // The online service hours. - ONLINE_SERVICE_HOURS = 13; - } - - // Structured information for special days that fall within the period that - // the returned opening hours cover. Special days are days that could impact - // the business hours of a place, e.g. Christmas day. - message SpecialDay { - // The date of this special day. - google.type.Date date = 1; - } - - // Is this place open right now? Always present unless we lack time-of-day - // or timezone data for these opening hours. - optional bool open_now = 1; - - // The periods that this place is open during the week. The periods are in - // chronological order, starting with Sunday in the place-local timezone. An - // empty (but not absent) value indicates a place that is never open, e.g. - // because it is closed temporarily for renovations. - repeated Period periods = 2; - - // Localized strings describing the opening hours of this place, one string - // for each day of the week. Will be empty if the hours are unknown or - // could not be converted to localized text. Example: "Sun: 18:00–06:00" - repeated string weekday_descriptions = 3; - - // A type string used to identify the type of secondary hours. - SecondaryHoursType secondary_hours_type = 4; - - // Structured information for special days that fall within the period that - // the returned opening hours cover. Special days are days that could impact - // the business hours of a place, e.g. Christmas day. Set for - // current_opening_hours and current_secondary_opening_hours if there are - // exceptional hours. - repeated SpecialDay special_days = 5; - } - - // Business status for the place. - enum BusinessStatus { - // Default value. This value is unused. - BUSINESS_STATUS_UNSPECIFIED = 0; - - // The establishment is operational, not necessarily open now. - OPERATIONAL = 1; - - // The establishment is temporarily closed. - CLOSED_TEMPORARILY = 2; - - // The establishment is permanently closed. - CLOSED_PERMANENTLY = 3; - } - - // Information about data providers of this place. - message Attribution { - // Name of the Place's data provider. - string provider = 1; - - // URI to the Place's data provider. - string provider_uri = 2; - } - - // Payment options the place accepts. - message PaymentOptions { - // Place accepts credit cards as payment. - optional bool accepts_credit_cards = 1; - - // Place accepts debit cards as payment. - optional bool accepts_debit_cards = 2; - - // Place accepts cash only as payment. Places with this attribute may still - // accept other payment methods. - optional bool accepts_cash_only = 3; - - // Place accepts NFC payments. - optional bool accepts_nfc = 4; - } - - // Information about parking options for the place. A parking lot could - // support more than one option at the same time. - message ParkingOptions { - // Place offers free parking lots. - optional bool free_parking_lot = 1; - - // Place offers paid parking lots. - optional bool paid_parking_lot = 2; - - // Place offers free street parking. - optional bool free_street_parking = 3; - - // Place offers paid street parking. - optional bool paid_street_parking = 4; - - // Place offers valet parking. - optional bool valet_parking = 5; - - // Place offers free garage parking. - optional bool free_garage_parking = 6; - - // Place offers paid garage parking. - optional bool paid_garage_parking = 7; - } - - // Place resource name and id of sub destinations that relate to the place. - // For example, different terminals are different destinations of an airport. - message SubDestination { - // The resource name of the sub destination. - string name = 1 [ - (google.api.resource_reference) = { type: "places.googleapis.com/Place" } - ]; - - // The place id of the sub destination. - string id = 2; - } - - // Information about the accessibility options a place offers. - message AccessibilityOptions { - // Place offers wheelchair accessible parking. - optional bool wheelchair_accessible_parking = 1; - - // Places has wheelchair accessible entrance. - optional bool wheelchair_accessible_entrance = 2; - - // Place has wheelchair accessible restroom. - optional bool wheelchair_accessible_restroom = 3; - - // Place has wheelchair accessible seating. - optional bool wheelchair_accessible_seating = 4; - } - - // Experimental: See - // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative - // for more details. - // - // AI-generated summary of the place. - message GenerativeSummary { - // The overview of the place. - google.type.LocalizedText overview = 1; - - // The detailed description of the place. - google.type.LocalizedText description = 2; - - // References that are used to generate the summary description. - References references = 3; - } - - // Experimental: See - // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative - // for more details. - // - // AI-generated summary of the area that the place is in. - message AreaSummary { - // Content blocks that compose the area summary. Each block has a separate - // topic about the area. - repeated ContentBlock content_blocks = 4; - } - - // This Place's resource name, in `places/{place_id}` format. Can be used to - // look up the Place. - string name = 1; - - // The unique identifier of a place. - string id = 2; - - // The localized name of the place, suitable as a short human-readable - // description. For example, "Google Sydney", "Starbucks", "Pyrmont", etc. - google.type.LocalizedText display_name = 31; - - // A set of type tags for this result. For example, "political" and - // "locality". For the complete list of possible values, see Table A and Table - // B at - // https://developers.google.com/maps/documentation/places/web-service/place-types - repeated string types = 5; - - // The primary type of the given result. This type must one of the Places API - // supported types. For example, "restaurant", "cafe", "airport", etc. A - // place can only have a single primary type. For the complete list of - // possible values, see Table A and Table B at - // https://developers.google.com/maps/documentation/places/web-service/place-types - string primary_type = 50; - - // The display name of the primary type, localized to the request language if - // applicable. For the complete list of possible values, see Table A and Table - // B at - // https://developers.google.com/maps/documentation/places/web-service/place-types - google.type.LocalizedText primary_type_display_name = 32; - - // A human-readable phone number for the place, in national format. - string national_phone_number = 7; - - // A human-readable phone number for the place, in international format. - string international_phone_number = 8; - - // A full, human-readable address for this place. - string formatted_address = 9; - - // A short, human-readable address for this place. - string short_formatted_address = 51; - - // Repeated components for each locality level. - // Note the following facts about the address_components[] array: - // - The array of address components may contain more components than the - // formatted_address. - // - The array does not necessarily include all the political entities that - // contain an address, apart from those included in the formatted_address. To - // retrieve all the political entities that contain a specific address, you - // should use reverse geocoding, passing the latitude/longitude of the address - // as a parameter to the request. - // - The format of the response is not guaranteed to remain the same between - // requests. In particular, the number of address_components varies based on - // the address requested and can change over time for the same address. A - // component can change position in the array. The type of the component can - // change. A particular component may be missing in a later response. - repeated AddressComponent address_components = 10; - - // Plus code of the place location lat/long. - PlusCode plus_code = 11; - - // The position of this place. - google.type.LatLng location = 12; - - // A viewport suitable for displaying the place on an average-sized map. - google.geo.type.Viewport viewport = 13; - - // A rating between 1.0 and 5.0, based on user reviews of this place. - double rating = 14; - - // A URL providing more information about this place. - string google_maps_uri = 15; - - // The authoritative website for this place, e.g. a business' homepage. - // Note that for places that are part of a chain (e.g. an IKEA store), this - // will usually be the website for the individual store, not the overall - // chain. - string website_uri = 16; - - // List of reviews about this place, sorted by relevance. A maximum of 5 - // reviews can be returned. - repeated Review reviews = 53; - - // The regular hours of operation. - OpeningHours regular_opening_hours = 21; - - // Number of minutes this place's timezone is currently offset from UTC. - // This is expressed in minutes to support timezones that are offset by - // fractions of an hour, e.g. X hours and 15 minutes. - optional int32 utc_offset_minutes = 22; - - // Information (including references) about photos of this place. A maximum of - // 10 photos can be returned. - repeated Photo photos = 54; - - // The place's address in adr microformat: http://microformats.org/wiki/adr. - string adr_format_address = 24; - - // The business status for the place. - BusinessStatus business_status = 25; - - // Price level of the place. - PriceLevel price_level = 26; - - // A set of data provider that must be shown with this result. - repeated Attribution attributions = 27; - - // The total number of reviews (with or without text) for this place. - optional int32 user_rating_count = 28; - - // A truncated URL to an icon mask. User can access different icon type by - // appending type suffix to the end (eg, ".svg" or ".png"). - string icon_mask_base_uri = 29; - - // Background color for icon_mask in hex format, e.g. #909CE1. - string icon_background_color = 30; - - // Specifies if the business supports takeout. - optional bool takeout = 33; - - // Specifies if the business supports delivery. - optional bool delivery = 34; - - // Specifies if the business supports indoor or outdoor seating options. - optional bool dine_in = 35; - - // Specifies if the business supports curbside pickup. - optional bool curbside_pickup = 36; - - // Specifies if the place supports reservations. - optional bool reservable = 38; - - // Specifies if the place serves breakfast. - optional bool serves_breakfast = 39; - - // Specifies if the place serves lunch. - optional bool serves_lunch = 40; - - // Specifies if the place serves dinner. - optional bool serves_dinner = 41; - - // Specifies if the place serves beer. - optional bool serves_beer = 42; - - // Specifies if the place serves wine. - optional bool serves_wine = 43; - - // Specifies if the place serves brunch. - optional bool serves_brunch = 44; - - // Specifies if the place serves vegetarian food. - optional bool serves_vegetarian_food = 45; - - // The hours of operation for the next seven days (including today). The time - // period starts at midnight on the date of the request and ends at 11:59 pm - // six days later. This field includes the special_days subfield of all hours, - // set for dates that have exceptional hours. - OpeningHours current_opening_hours = 46; - - // Contains an array of entries for the next seven days including information - // about secondary hours of a business. Secondary hours are different from a - // business's main hours. For example, a restaurant can specify drive through - // hours or delivery hours as its secondary hours. This field populates the - // type subfield, which draws from a predefined list of opening hours types - // (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the - // place. This field includes the special_days subfield of all hours, set for - // dates that have exceptional hours. - repeated OpeningHours current_secondary_opening_hours = 47; - - // Contains an array of entries for information about regular secondary hours - // of a business. Secondary hours are different from a business's main hours. - // For example, a restaurant can specify drive through hours or delivery hours - // as its secondary hours. This field populates the type subfield, which draws - // from a predefined list of opening hours types (such as DRIVE_THROUGH, - // PICKUP, or TAKEOUT) based on the types of the place. - repeated OpeningHours regular_secondary_opening_hours = 49; - - // Contains a summary of the place. A summary is comprised of a textual - // overview, and also includes the language code for these if applicable. - // Summary text must be presented as-is and can not be modified or altered. - google.type.LocalizedText editorial_summary = 52; - - // Place provides outdoor seating. - optional bool outdoor_seating = 55; - - // Place provides live music. - optional bool live_music = 56; - - // Place has a children's menu. - optional bool menu_for_children = 57; - - // Place serves cocktails. - optional bool serves_cocktails = 58; - - // Place serves dessert. - optional bool serves_dessert = 59; - - // Place serves coffee. - optional bool serves_coffee = 60; - - // Place is good for children. - optional bool good_for_children = 62; - - // Place allows dogs. - optional bool allows_dogs = 63; - - // Place has restroom. - optional bool restroom = 64; - - // Place accommodates groups. - optional bool good_for_groups = 65; - - // Place is suitable for watching sports. - optional bool good_for_watching_sports = 66; - - // Payment options the place accepts. If a payment option data is not - // available, the payment option field will be unset. - PaymentOptions payment_options = 67; - - // Options of parking provided by the place. - ParkingOptions parking_options = 70; - - // A list of sub destinations related to the place. - repeated SubDestination sub_destinations = 71; - - // Information about the accessibility options a place offers. - optional AccessibilityOptions accessibility_options = 72; - - // The most recent information about fuel options in a gas station. This - // information is updated regularly. - FuelOptions fuel_options = 78; - - // Information of ev charging options. - EVChargeOptions ev_charge_options = 79; - - // Experimental: See - // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative - // for more details. - // - // AI-generated summary of the place. - GenerativeSummary generative_summary = 80; - - // Experimental: See - // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative - // for more details. - // - // AI-generated summary of the area that the place is in. - AreaSummary area_summary = 81; -} - -// Price level of the place. -enum PriceLevel { - // Place price level is unspecified or unknown. - PRICE_LEVEL_UNSPECIFIED = 0; - - // Place provides free services. - PRICE_LEVEL_FREE = 1; - - // Place provides inexpensive services. - PRICE_LEVEL_INEXPENSIVE = 2; - - // Place provides moderately priced services. - PRICE_LEVEL_MODERATE = 3; - - // Place provides expensive services. - PRICE_LEVEL_EXPENSIVE = 4; - - // Place provides very expensive services. - PRICE_LEVEL_VERY_EXPENSIVE = 5; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto deleted file mode 100644 index ea9f82aa2e0..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/places_service.proto +++ /dev/null @@ -1,772 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/geo/type/viewport.proto"; -import "google/maps/places/v1/contextual_content.proto"; -import "google/maps/places/v1/ev_charging.proto"; -import "google/maps/places/v1/geometry.proto"; -import "google/maps/places/v1/place.proto"; -import "google/type/latlng.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "PlacesServiceProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Service definition for the Places API. -// Note: every request (except for Autocomplete requests) requires a field mask -// set outside of the request proto (`all/*`, is not assumed). The field mask -// can be set via the HTTP header `X-Goog-FieldMask`. See: -// https://developers.google.com/maps/documentation/places/web-service/choose-fields -service Places { - option (google.api.default_host) = "places.googleapis.com"; - - // Search for places near locations. - rpc SearchNearby(SearchNearbyRequest) returns (SearchNearbyResponse) { - option (google.api.http) = { - post: "/v1/places:searchNearby" - body: "*" - }; - } - - // Text query based place search. - rpc SearchText(SearchTextRequest) returns (SearchTextResponse) { - option (google.api.http) = { - post: "/v1/places:searchText" - body: "*" - }; - } - - // Get a photo media with a photo reference string. - rpc GetPhotoMedia(GetPhotoMediaRequest) returns (PhotoMedia) { - option (google.api.http) = { - get: "/v1/{name=places/*/photos/*/media}" - }; - option (google.api.method_signature) = "name"; - } - - // Get the details of a place based on its resource name, which is a string - // in the `places/{place_id}` format. - rpc GetPlace(GetPlaceRequest) returns (Place) { - option (google.api.http) = { - get: "/v1/{name=places/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Returns predictions for the given input. - rpc AutocompletePlaces(AutocompletePlacesRequest) - returns (AutocompletePlacesResponse) { - option (google.api.http) = { - post: "/v1/places:autocomplete" - body: "*" - }; - } -} - -// Request proto for Search Nearby. -// -// -message SearchNearbyRequest { - // The region to search. - message LocationRestriction { - oneof type { - // A circle defined by center point and radius. - Circle circle = 2; - } - } - - // How results will be ranked in the response. - enum RankPreference { - // RankPreference value not set. Will use rank by POPULARITY by default. - RANK_PREFERENCE_UNSPECIFIED = 0; - - // Ranks results by distance. - DISTANCE = 1; - - // Ranks results by popularity. - POPULARITY = 2; - } - - // Place details will be displayed with the preferred language if available. - // If the language code is unspecified or unrecognized, place details of any - // language may be returned, with a preference for English if such details - // exist. - // - // Current list of supported languages: - // https://developers.google.com/maps/faq#languagesupport. - string language_code = 1; - - // The Unicode country/region code (CLDR) of the location where the - // request is coming from. This parameter is used to display the place - // details, like region-specific place name, if available. The parameter can - // affect results based on applicable law. - // - // For more information, see - // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - // - // - // Note that 3-digit region codes are not currently supported. - string region_code = 2; - - // Included Place type (eg, "restaurant" or "gas_station") from - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // - // Up to 50 types from [Table - // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - // may be specified. - // - // If there are any conflicting types, i.e. a type appears in both - // included_types and excluded_types, an INVALID_ARGUMENT error is - // returned. - // - // If a Place type is specified with multiple type restrictions, only places - // that satisfy all of the restrictions are returned. For example, if we - // have {included_types = ["restaurant"], excluded_primary_types = - // ["restaurant"]}, the returned places provide "restaurant" - // related services but do not operate primarily as "restaurants". - repeated string included_types = 3; - - // Excluded Place type (eg, "restaurant" or "gas_station") from - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // - // Up to 50 types from [Table - // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - // may be specified. - // - // If the client provides both included_types (e.g. restaurant) and - // excluded_types (e.g. cafe), then the response should include places that - // are restaurant but not cafe. The response includes places that match at - // least one of the included_types and none of the excluded_types. - // - // If there are any conflicting types, i.e. a type appears in both - // included_types and excluded_types, an INVALID_ARGUMENT error is returned. - // - // If a Place type is specified with multiple type restrictions, only places - // that satisfy all of the restrictions are returned. For example, if we - // have {included_types = ["restaurant"], excluded_primary_types = - // ["restaurant"]}, the returned places provide "restaurant" - // related services but do not operate primarily as "restaurants". - repeated string excluded_types = 4; - - // Included primary Place type (e.g. "restaurant" or "gas_station") from - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // A place can only have a single primary type from the supported types table - // associated with it. - // - // Up to 50 types from [Table - // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - // may be specified. - // - // If there are any conflicting primary types, i.e. a type appears in both - // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - // error is returned. - // - // If a Place type is specified with multiple type restrictions, only places - // that satisfy all of the restrictions are returned. For example, if we - // have {included_types = ["restaurant"], excluded_primary_types = - // ["restaurant"]}, the returned places provide "restaurant" - // related services but do not operate primarily as "restaurants". - repeated string included_primary_types = 5; - - // Excluded primary Place type (e.g. "restaurant" or "gas_station") from - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // - // Up to 50 types from [Table - // A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - // may be specified. - // - // If there are any conflicting primary types, i.e. a type appears in both - // included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - // error is returned. - // - // If a Place type is specified with multiple type restrictions, only places - // that satisfy all of the restrictions are returned. For example, if we - // have {included_types = ["restaurant"], excluded_primary_types = - // ["restaurant"]}, the returned places provide "restaurant" - // related services but do not operate primarily as "restaurants". - repeated string excluded_primary_types = 6; - - // Maximum number of results to return. It must be between 1 and 20 (default), - // inclusively. If the number is unset, it falls back to the upper limit. If - // the number is set to negative or exceeds the upper limit, an - // INVALID_ARGUMENT error is returned. - int32 max_result_count = 7; - - // Required. The region to search. - LocationRestriction location_restriction = 8 - [(google.api.field_behavior) = REQUIRED]; - - // How results will be ranked in the response. - RankPreference rank_preference = 9; -} - -// Response proto for Search Nearby. -// -message SearchNearbyResponse { - // A list of places that meets user's requirements like places - // types, number of places and specific location restriction. - repeated Place places = 1; -} - -// Request proto for SearchText. -// -// -message SearchTextRequest { - // How results will be ranked in the response. - enum RankPreference { - // For a categorical query such as "Restaurants in New York City", RELEVANCE - // is the default. For non-categorical queries such as "Mountain View, CA" - // we recommend that you leave rankPreference unset. - RANK_PREFERENCE_UNSPECIFIED = 0; - - // Ranks results by distance. - DISTANCE = 1; - - // Ranks results by relevance. Sort order determined by normal ranking - // stack. - RELEVANCE = 2; - } - - // The region to search. This location serves as a bias which means results - // around given location might be returned. - message LocationBias { - oneof type { - // A rectangle box defined by northeast and southwest corner. - // `rectangle.high()` must be the northeast point of the rectangle - // viewport. `rectangle.low()` must be the southwest point of the - // rectangle viewport. `rectangle.low().latitude()` cannot be greater than - // `rectangle.high().latitude()`. This will result in an empty latitude - // range. A rectangle viewport cannot be wider than 180 degrees. - google.geo.type.Viewport rectangle = 1; - - // A circle defined by center point and radius. - Circle circle = 2; - } - } - - // The region to search. This location serves as a restriction which means - // results outside given location will not be returned. - message LocationRestriction { - oneof type { - // A rectangle box defined by northeast and southwest corner. - // `rectangle.high()` must be the northeast point of the rectangle - // viewport. `rectangle.low()` must be the southwest point of the - // rectangle viewport. `rectangle.low().latitude()` cannot be greater than - // `rectangle.high().latitude()`. This will result in an empty latitude - // range. A rectangle viewport cannot be wider than 180 degrees. - google.geo.type.Viewport rectangle = 1; - } - } - - // Searchable EV options of a place search request. - message EVOptions { - // Optional. Minimum required charging rate in kilowatts. A place with a - // charging rate less than the specified rate is filtered out. - double minimum_charging_rate_kw = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of preferred EV connector types. A place that does not - // support any of the listed connector types is filtered out. - repeated EVConnectorType connector_types = 2 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. The text query for textual search. - string text_query = 1 [(google.api.field_behavior) = REQUIRED]; - - // Place details will be displayed with the preferred language if available. - // If the language code is unspecified or unrecognized, place details of any - // language may be returned, with a preference for English if such details - // exist. - // - // Current list of supported languages: - // https://developers.google.com/maps/faq#languagesupport. - string language_code = 2; - - // The Unicode country/region code (CLDR) of the location where the - // request is coming from. This parameter is used to display the place - // details, like region-specific place name, if available. The parameter can - // affect results based on applicable law. - // - // For more information, see - // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - // - // - // Note that 3-digit region codes are not currently supported. - string region_code = 3; - - // How results will be ranked in the response. - RankPreference rank_preference = 4; - - // The requested place type. Full list of types supported: - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // Only support one included type. - string included_type = 6; - - // Used to restrict the search to places that are currently open. The default - // is false. - bool open_now = 7; - - // Filter out results whose average user rating is strictly less than this - // limit. A valid value must be a float between 0 and 5 (inclusively) at a - // 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating - // will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 - // will eliminate all results with a less than 1.0 rating. - double min_rating = 9; - - // Maximum number of results to return. It must be between 1 and 20, - // inclusively. The default is 20. If the number is unset, it falls back to - // the upper limit. If the number is set to negative or exceeds the upper - // limit, an INVALID_ARGUMENT error is returned. - int32 max_result_count = 10; - - // Used to restrict the search to places that are marked as certain price - // levels. Users can choose any combinations of price levels. Default to - // select all price levels. - repeated PriceLevel price_levels = 11; - - // Used to set strict type filtering for included_type. If set to true, only - // results of the same type will be returned. Default to false. - bool strict_type_filtering = 12; - - // The region to search. This location serves as a bias which means results - // around given location might be returned. Cannot be set along with - // location_restriction. - LocationBias location_bias = 13; - - // The region to search. This location serves as a restriction which means - // results outside given location will not be returned. Cannot be set along - // with location_bias. - LocationRestriction location_restriction = 14; - - // Optional. Set the searchable EV options of a place search request. - EVOptions ev_options = 15 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response proto for SearchText. -// -message SearchTextResponse { - // A list of places that meet the user's text search criteria. - repeated Place places = 1; - - // Experimental: See - // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative - // for more details. - // - // A list of contextual contents where each entry associates to the - // corresponding place in the same index in the places field. The contents - // that are relevant to the `text_query` in the request are preferred. If the - // contextual content is not available for one of the places, it will return - // non-contextual content. It will be empty only when the content is - // unavailable for this place. This list should have as many entries as the - // list of places if requested. - repeated ContextualContent contextual_contents = 3; -} - -// Request for fetching a photo of a place using a photo resource name. -message GetPhotoMediaRequest { - // Required. The resource name of a photo media in the format: - // `places/{place_id}/photos/{photo_reference}/media`. - // - // The resource name of a photo as returned in a Place object's `photos.name` - // field comes with the format - // `places/{place_id}/photos/{photo_reference}`. You need to append `/media` - // at the end of the photo resource to get the photo media resource name. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "places.googleapis.com/PhotoMedia" - } - ]; - - // Optional. Specifies the maximum desired width, in pixels, of the image. If - // the image is smaller than the values specified, the original image will be - // returned. If the image is larger in either dimension, it will be scaled to - // match the smaller of the two dimensions, restricted to its original aspect - // ratio. Both the max_height_px and max_width_px properties accept an integer - // between 1 and 4800, inclusively. If the value is not within the allowed - // range, an INVALID_ARGUMENT error will be returned. - // - // At least one of max_height_px or max_width_px needs to be specified. If - // neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - // error will be returned. - int32 max_width_px = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the maximum desired height, in pixels, of the image. If - // the image is smaller than the values specified, the original image will be - // returned. If the image is larger in either dimension, it will be scaled to - // match the smaller of the two dimensions, restricted to its original aspect - // ratio. Both the max_height_px and max_width_px properties accept an integer - // between 1 and 4800, inclusively. If the value is not within the allowed - // range, an INVALID_ARGUMENT error will be returned. - // - // At least one of max_height_px or max_width_px needs to be specified. If - // neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - // error will be returned. - int32 max_height_px = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, skip the default HTTP redirect behavior and render a text - // format (for example, in JSON format for HTTP use case) response. If not - // set, an HTTP redirect will be issued to redirect the call to the image - // media. This option is ignored for non-HTTP requests. - bool skip_http_redirect = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// A photo media from Places API. -message PhotoMedia { - option (google.api.resource) = { - type: "places.googleapis.com/PhotoMedia" - pattern: "places/{place_id}/photos/{photo_reference}/media" - plural: "photoMedias" - singular: "photoMedia" - }; - - // The resource name of a photo media in the format: - // `places/{place_id}/photos/{photo_reference}/media`. - string name = 1; - - // A short-lived uri that can be used to render the photo. - string photo_uri = 2; -} - -// Request for fetching a Place based on its resource name, which is a string in -// the `places/{place_id}` format. -message GetPlaceRequest { - // Required. The resource name of a place, in the `places/{place_id}` format. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "places.googleapis.com/Place" } - ]; - - // Optional. Place details will be displayed with the preferred language if - // available. - // - // Current list of supported languages: - // https://developers.google.com/maps/faq#languagesupport. - string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Unicode country/region code (CLDR) of the location where the - // request is coming from. This parameter is used to display the place - // details, like region-specific place name, if available. The parameter can - // affect results based on applicable law. - // For more information, see - // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - // - // - // Note that 3-digit region codes are not currently supported. - string region_code = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A string which identifies an Autocomplete session for billing - // purposes. Must be a URL and filename safe base64 string with at most 36 - // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - // returned. - // - // The session begins when the user starts typing a query, and concludes when - // they select a place and a call to Place Details or Address Validation is - // made. Each session can have multiple queries, followed by one Place Details - // or Address Validation request. The credentials used for each request within - // a session must belong to the same Google Cloud Console project. Once a - // session has concluded, the token is no longer valid; your app must generate - // a fresh token for each session. If the `session_token` parameter is - // omitted, or if you reuse a session token, the session is charged as if no - // session token was provided (each request is billed separately). - // - // We recommend the following guidelines: - // - // * Use session tokens for all Place Autocomplete calls. - // * Generate a fresh token for each session. Using a version 4 UUID is - // recommended. - // * Ensure that the credentials used for all Place Autocomplete, Place - // Details, and Address Validation requests within a session belong to the - // same Cloud Console project. - // * Be sure to pass a unique session token for each new session. Using the - // same token for more than one session will result in each request being - // billed individually. - string session_token = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request proto for AutocompletePlaces. -message AutocompletePlacesRequest { - // The region to search. The results may be biased around the specified - // region. - message LocationBias { - oneof type { - // A viewport defined by a northeast and a southwest corner. - google.geo.type.Viewport rectangle = 1; - - // A circle defined by a center point and radius. - Circle circle = 2; - } - } - - // The region to search. The results will be restricted to the specified - // region. - message LocationRestriction { - oneof type { - // A viewport defined by a northeast and a southwest corner. - google.geo.type.Viewport rectangle = 1; - - // A circle defined by a center point and radius. - Circle circle = 2; - } - } - - // Required. The text string on which to search. - string input = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Bias results to a specified location. - // - // At most one of `location_bias` or `location_restriction` should be set. If - // neither are set, the results will be biased by IP address, meaning the IP - // address will be mapped to an imprecise location and used as a biasing - // signal. - LocationBias location_bias = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Restrict results to a specified location. - // - // At most one of `location_bias` or `location_restriction` should be set. If - // neither are set, the results will be biased by IP address, meaning the IP - // address will be mapped to an imprecise location and used as a biasing - // signal. - LocationRestriction location_restriction = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Included primary Place type (for example, "restaurant" or - // "gas_station") in Place Types - // (https://developers.google.com/maps/documentation/places/web-service/place-types), - // or only `(regions)`, or only `(cities)`. A Place is only returned if its - // primary type is included in this list. Up to 5 values can be specified. If - // no types are specified, all Place types are returned. - repeated string included_primary_types = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Only include results in the specified regions, specified as up to - // 15 CLDR two-character region codes. An empty set will not restrict the - // results. If both `location_restriction` and `included_region_codes` are - // set, the results will be located in the area of intersection. - repeated string included_region_codes = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The language in which to return results. Defaults to en-US. The - // results may be in mixed languages if the language used in `input` is - // different from `language_code` or if the returned Place does not have a - // translation from the local language to `language_code`. - string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The region code, specified as a CLDR two-character region code. - // This affects address formatting, result ranking, and may influence what - // results are returned. This does not restrict results to the specified - // region. To restrict results to a region, use `region_code_restriction`. - string region_code = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The origin point from which to calculate geodesic distance to the - // destination (returned as `distance_meters`). If this value is omitted, - // geodesic distance will not be returned. - google.type.LatLng origin = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A zero-based Unicode character offset of `input` indicating the - // cursor position in `input`. The cursor position may influence what - // predictions are returned. - // - // If empty, defaults to the length of `input`. - int32 input_offset = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, the response will include both Place and query - // predictions. Otherwise the response will only return Place predictions. - bool include_query_predictions = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A string which identifies an Autocomplete session for billing - // purposes. Must be a URL and filename safe base64 string with at most 36 - // ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - // returned. - // - // The session begins when the user starts typing a query, and concludes when - // they select a place and a call to Place Details or Address Validation is - // made. Each session can have multiple queries, followed by one Place Details - // or Address Validation request. The credentials used for each request within - // a session must belong to the same Google Cloud Console project. Once a - // session has concluded, the token is no longer valid; your app must generate - // a fresh token for each session. If the `session_token` parameter is - // omitted, or if you reuse a session token, the session is charged as if no - // session token was provided (each request is billed separately). - // - // We recommend the following guidelines: - // - // * Use session tokens for all Place Autocomplete calls. - // * Generate a fresh token for each session. Using a version 4 UUID is - // recommended. - // * Ensure that the credentials used for all Place Autocomplete, Place - // Details, and Address Validation requests within a session belong to the - // same Cloud Console project. - // * Be sure to pass a unique session token for each new session. Using the - // same token for more than one session will result in each request being - // billed individually. - string session_token = 11 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response proto for AutocompletePlaces. -message AutocompletePlacesResponse { - // An Autocomplete suggestion result. - message Suggestion { - // Identifies a substring within a given text. - message StringRange { - // Zero-based offset of the first Unicode character of the string - // (inclusive). - int32 start_offset = 1; - - // Zero-based offset of the last Unicode character (exclusive). - int32 end_offset = 2; - } - - // Text representing a Place or query prediction. The text may be used as is - // or formatted. - message FormattableText { - // Text that may be used as is or formatted with `matches`. - string text = 1; - - // A list of string ranges identifying where the input request matched in - // `text`. The ranges can be used to format specific parts of `text`. The - // substrings may not be exact matches of `input` if the matching was - // determined by criteria other than string matching (for example, spell - // corrections or transliterations). - // - // These values are Unicode character offsets of `text`. The ranges are - // guaranteed to be ordered in increasing offset values. - repeated StringRange matches = 2; - } - - // Contains a breakdown of a Place or query prediction into main text - // and secondary text. - // - // For Place predictions, the main text contains the specific name of the - // Place. For query predictions, the main text contains the query. - // - // The secondary text contains additional disambiguating features (such as a - // city or region) to further identify the Place or refine the query. - message StructuredFormat { - // Represents the name of the Place or query. - FormattableText main_text = 1; - - // Represents additional disambiguating features (such as a city or - // region) to further identify the Place or refine the query. - FormattableText secondary_text = 2; - } - - // Prediction results for a Place Autocomplete prediction. - message PlacePrediction { - // The resource name of the suggested Place. This name can be used in - // other APIs that accept Place names. - string place = 1 [(google.api.resource_reference) = { - type: "places.googleapis.com/Place" - }]; - - // The unique identifier of the suggested Place. This identifier can be - // used in other APIs that accept Place IDs. - string place_id = 2; - - // Contains the human-readable name for the returned result. For - // establishment results, this is usually the business name and address. - // - // `text` is recommended for developers who wish to show a single UI - // element. Developers who wish to show two separate, but related, UI - // elements may want to use `structured_format` instead. They are two - // different ways to represent a Place prediction. Users should not try to - // parse `structured_format` into `text` or vice versa. - // - // This text may be different from the `display_name` returned by - // GetPlace. - // - // May be in mixed languages if the request `input` and `language_code` - // are in different languages or if the Place does not have a translation - // from the local language to `language_code`. - FormattableText text = 3; - - // A breakdown of the Place prediction into main text containing the name - // of the Place and secondary text containing additional disambiguating - // features (such as a city or region). - // - // `structured_format` is recommended for developers who wish to show two - // separate, but related, UI elements. Developers who wish to show a - // single UI element may want to use `text` instead. They are two - // different ways to represent a Place prediction. Users should not try to - // parse `structured_format` into `text` or vice versa. - StructuredFormat structured_format = 4; - - // List of types that apply to this Place from Table A or Table B in - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // - // A type is a categorization of a Place. Places with shared types will - // share similar characteristics. - repeated string types = 5; - - // The length of the geodesic in meters from `origin` if `origin` is - // specified. Certain predictions such as routes may not populate this - // field. - int32 distance_meters = 6; - } - - // Prediction results for a Query Autocomplete prediction. - message QueryPrediction { - // The predicted text. This text does not represent a Place, but rather a - // text query that could be used in a search endpoint (for example, - // Text Search). - // - // `text` is recommended for developers who wish to show a single UI - // element. Developers who wish to show two separate, but related, UI - // elements may want to use `structured_format` instead. They are two - // different ways to represent a query prediction. Users should not try to - // parse `structured_format` into `text` or vice versa. - // - // May be in mixed languages if the request `input` and `language_code` - // are in different languages or if part of the query does not have a - // translation from the local language to `language_code`. - FormattableText text = 1; - - // A breakdown of the query prediction into main text containing the query - // and secondary text containing additional disambiguating features (such - // as a city or region). - // - // `structured_format` is recommended for developers who wish to show two - // separate, but related, UI elements. Developers who wish to show a - // single UI element may want to use `text` instead. They are two - // different ways to represent a query prediction. Users should not try to - // parse `structured_format` into `text` or vice versa. - StructuredFormat structured_format = 2; - } - - oneof kind { - // A prediction for a Place. - PlacePrediction place_prediction = 1; - - // A prediction for a query. - QueryPrediction query_prediction = 2; - } - } - - // Contains a list of suggestions, ordered in descending order of relevance. - repeated Suggestion suggestions = 1; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto b/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto deleted file mode 100644 index 5aaca3ab88a..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/review.proto +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.maps.places.v1; - -import "google/api/resource.proto"; -import "google/maps/places/v1/attribution.proto"; -import "google/protobuf/timestamp.proto"; -import "google/type/localized_text.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Maps.Places.V1"; -option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; -option java_multiple_files = true; -option java_outer_classname = "ReviewProto"; -option java_package = "com.google.maps.places.v1"; -option objc_class_prefix = "GMPSV1"; -option php_namespace = "Google\\Maps\\Places\\V1"; - -// Information about a review of a place. -message Review { - option (google.api.resource) = { - type: "places.googleapis.com/Review" - pattern: "places/{place}/reviews/{review}" - plural: "reviews" - singular: "review" - }; - - // A reference representing this place review which may be used to look up - // this place review again (also called the API "resource" name: - // `places/{place_id}/reviews/{review}`). - string name = 1; - - // A string of formatted recent time, expressing the review time relative - // to the current time in a form appropriate for the language and country. - string relative_publish_time_description = 2; - - // The localized text of the review. - google.type.LocalizedText text = 9; - - // The review text in its original language. - google.type.LocalizedText original_text = 12; - - // A number between 1.0 and 5.0, also called the number of stars. - double rating = 7; - - // This review's author. - AuthorAttribution author_attribution = 13; - - // Timestamp for the review. - google.protobuf.Timestamp publish_time = 14; -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts b/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts deleted file mode 100644 index 5942a59bebd..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/protos.d.ts +++ /dev/null @@ -1,13421 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace geo. */ - namespace geo { - - /** Namespace type. */ - namespace type { - - /** Properties of a Viewport. */ - interface IViewport { - - /** Viewport low */ - low?: (google.type.ILatLng|null); - - /** Viewport high */ - high?: (google.type.ILatLng|null); - } - - /** Represents a Viewport. */ - class Viewport implements IViewport { - - /** - * Constructs a new Viewport. - * @param [properties] Properties to set - */ - constructor(properties?: google.geo.type.IViewport); - - /** Viewport low. */ - public low?: (google.type.ILatLng|null); - - /** Viewport high. */ - public high?: (google.type.ILatLng|null); - - /** - * Creates a new Viewport instance using the specified properties. - * @param [properties] Properties to set - * @returns Viewport instance - */ - public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport; - - /** - * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @param message Viewport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @param message Viewport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Viewport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport; - - /** - * Decodes a Viewport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport; - - /** - * Verifies a Viewport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Viewport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Viewport - */ - public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport; - - /** - * Creates a plain object from a Viewport message. Also converts values to other types if specified. - * @param message Viewport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Viewport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Viewport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a LatLng. */ - interface ILatLng { - - /** LatLng latitude */ - latitude?: (number|null); - - /** LatLng longitude */ - longitude?: (number|null); - } - - /** Represents a LatLng. */ - class LatLng implements ILatLng { - - /** - * Constructs a new LatLng. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILatLng); - - /** LatLng latitude. */ - public latitude: number; - - /** LatLng longitude. */ - public longitude: number; - - /** - * Creates a new LatLng instance using the specified properties. - * @param [properties] Properties to set - * @returns LatLng instance - */ - public static create(properties?: google.type.ILatLng): google.type.LatLng; - - /** - * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @param message LatLng message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @param message LatLng message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatLng message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng; - - /** - * Decodes a LatLng message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng; - - /** - * Verifies a LatLng message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatLng - */ - public static fromObject(object: { [k: string]: any }): google.type.LatLng; - - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @param message LatLng - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatLng to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatLng - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LocalizedText. */ - interface ILocalizedText { - - /** LocalizedText text */ - text?: (string|null); - - /** LocalizedText languageCode */ - languageCode?: (string|null); - } - - /** Represents a LocalizedText. */ - class LocalizedText implements ILocalizedText { - - /** - * Constructs a new LocalizedText. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILocalizedText); - - /** LocalizedText text. */ - public text: string; - - /** LocalizedText languageCode. */ - public languageCode: string; - - /** - * Creates a new LocalizedText instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalizedText instance - */ - public static create(properties?: google.type.ILocalizedText): google.type.LocalizedText; - - /** - * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @param message LocalizedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @param message LocalizedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalizedText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LocalizedText; - - /** - * Decodes a LocalizedText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LocalizedText; - - /** - * Verifies a LocalizedText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalizedText - */ - public static fromObject(object: { [k: string]: any }): google.type.LocalizedText; - - /** - * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. - * @param message LocalizedText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LocalizedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalizedText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalizedText - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Money. */ - interface IMoney { - - /** Money currencyCode */ - currencyCode?: (string|null); - - /** Money units */ - units?: (number|Long|string|null); - - /** Money nanos */ - nanos?: (number|null); - } - - /** Represents a Money. */ - class Money implements IMoney { - - /** - * Constructs a new Money. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IMoney); - - /** Money currencyCode. */ - public currencyCode: string; - - /** Money units. */ - public units: (number|Long|string); - - /** Money nanos. */ - public nanos: number; - - /** - * Creates a new Money instance using the specified properties. - * @param [properties] Properties to set - * @returns Money instance - */ - public static create(properties?: google.type.IMoney): google.type.Money; - - /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Money message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Money; - - /** - * Decodes a Money message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Money; - - /** - * Verifies a Money message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Money message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Money - */ - public static fromObject(object: { [k: string]: any }): google.type.Money; - - /** - * Creates a plain object from a Money message. Also converts values to other types if specified. - * @param message Money - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Money to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Money - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; - - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace maps. */ - namespace maps { - - /** Namespace places. */ - namespace places { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an AuthorAttribution. */ - interface IAuthorAttribution { - - /** AuthorAttribution displayName */ - displayName?: (string|null); - - /** AuthorAttribution uri */ - uri?: (string|null); - - /** AuthorAttribution photoUri */ - photoUri?: (string|null); - } - - /** Represents an AuthorAttribution. */ - class AuthorAttribution implements IAuthorAttribution { - - /** - * Constructs a new AuthorAttribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IAuthorAttribution); - - /** AuthorAttribution displayName. */ - public displayName: string; - - /** AuthorAttribution uri. */ - public uri: string; - - /** AuthorAttribution photoUri. */ - public photoUri: string; - - /** - * Creates a new AuthorAttribution instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthorAttribution instance - */ - public static create(properties?: google.maps.places.v1.IAuthorAttribution): google.maps.places.v1.AuthorAttribution; - - /** - * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @param message AuthorAttribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @param message AuthorAttribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthorAttribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AuthorAttribution; - - /** - * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AuthorAttribution; - - /** - * Verifies an AuthorAttribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthorAttribution - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AuthorAttribution; - - /** - * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. - * @param message AuthorAttribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AuthorAttribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthorAttribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuthorAttribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContentBlock. */ - interface IContentBlock { - - /** ContentBlock topic */ - topic?: (string|null); - - /** ContentBlock content */ - content?: (google.type.ILocalizedText|null); - - /** ContentBlock references */ - references?: (google.maps.places.v1.IReferences|null); - } - - /** Represents a ContentBlock. */ - class ContentBlock implements IContentBlock { - - /** - * Constructs a new ContentBlock. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IContentBlock); - - /** ContentBlock topic. */ - public topic: string; - - /** ContentBlock content. */ - public content?: (google.type.ILocalizedText|null); - - /** ContentBlock references. */ - public references?: (google.maps.places.v1.IReferences|null); - - /** - * Creates a new ContentBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns ContentBlock instance - */ - public static create(properties?: google.maps.places.v1.IContentBlock): google.maps.places.v1.ContentBlock; - - /** - * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. - * @param message ContentBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. - * @param message ContentBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContentBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContentBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContentBlock; - - /** - * Decodes a ContentBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContentBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContentBlock; - - /** - * Verifies a ContentBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContentBlock - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContentBlock; - - /** - * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. - * @param message ContentBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContentBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContentBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContentBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a References. */ - interface IReferences { - - /** References reviews */ - reviews?: (google.maps.places.v1.IReview[]|null); - - /** References places */ - places?: (string[]|null); - } - - /** Represents a References. */ - class References implements IReferences { - - /** - * Constructs a new References. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IReferences); - - /** References reviews. */ - public reviews: google.maps.places.v1.IReview[]; - - /** References places. */ - public places: string[]; - - /** - * Creates a new References instance using the specified properties. - * @param [properties] Properties to set - * @returns References instance - */ - public static create(properties?: google.maps.places.v1.IReferences): google.maps.places.v1.References; - - /** - * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. - * @param message References message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. - * @param message References message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a References message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns References - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.References; - - /** - * Decodes a References message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns References - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.References; - - /** - * Verifies a References message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a References message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns References - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.References; - - /** - * Creates a plain object from a References message. Also converts values to other types if specified. - * @param message References - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.References, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this References to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for References - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Review. */ - interface IReview { - - /** Review name */ - name?: (string|null); - - /** Review relativePublishTimeDescription */ - relativePublishTimeDescription?: (string|null); - - /** Review text */ - text?: (google.type.ILocalizedText|null); - - /** Review originalText */ - originalText?: (google.type.ILocalizedText|null); - - /** Review rating */ - rating?: (number|null); - - /** Review authorAttribution */ - authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); - - /** Review publishTime */ - publishTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Review. */ - class Review implements IReview { - - /** - * Constructs a new Review. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IReview); - - /** Review name. */ - public name: string; - - /** Review relativePublishTimeDescription. */ - public relativePublishTimeDescription: string; - - /** Review text. */ - public text?: (google.type.ILocalizedText|null); - - /** Review originalText. */ - public originalText?: (google.type.ILocalizedText|null); - - /** Review rating. */ - public rating: number; - - /** Review authorAttribution. */ - public authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); - - /** Review publishTime. */ - public publishTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Review instance using the specified properties. - * @param [properties] Properties to set - * @returns Review instance - */ - public static create(properties?: google.maps.places.v1.IReview): google.maps.places.v1.Review; - - /** - * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @param message Review message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @param message Review message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Review message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Review; - - /** - * Decodes a Review message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Review; - - /** - * Verifies a Review message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Review message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Review - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Review; - - /** - * Creates a plain object from a Review message. Also converts values to other types if specified. - * @param message Review - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Review, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Review to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Review - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContextualContent. */ - interface IContextualContent { - - /** ContextualContent reviews */ - reviews?: (google.maps.places.v1.IReview[]|null); - - /** ContextualContent photos */ - photos?: (google.maps.places.v1.IPhoto[]|null); - - /** ContextualContent justifications */ - justifications?: (google.maps.places.v1.ContextualContent.IJustification[]|null); - } - - /** Represents a ContextualContent. */ - class ContextualContent implements IContextualContent { - - /** - * Constructs a new ContextualContent. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IContextualContent); - - /** ContextualContent reviews. */ - public reviews: google.maps.places.v1.IReview[]; - - /** ContextualContent photos. */ - public photos: google.maps.places.v1.IPhoto[]; - - /** ContextualContent justifications. */ - public justifications: google.maps.places.v1.ContextualContent.IJustification[]; - - /** - * Creates a new ContextualContent instance using the specified properties. - * @param [properties] Properties to set - * @returns ContextualContent instance - */ - public static create(properties?: google.maps.places.v1.IContextualContent): google.maps.places.v1.ContextualContent; - - /** - * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. - * @param message ContextualContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. - * @param message ContextualContent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContextualContent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContextualContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent; - - /** - * Decodes a ContextualContent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContextualContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent; - - /** - * Verifies a ContextualContent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContextualContent - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent; - - /** - * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. - * @param message ContextualContent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContextualContent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContextualContent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ContextualContent { - - /** Properties of a Justification. */ - interface IJustification { - - /** Justification reviewJustification */ - reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); - - /** Justification businessAvailabilityAttributesJustification */ - businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); - } - - /** Represents a Justification. */ - class Justification implements IJustification { - - /** - * Constructs a new Justification. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ContextualContent.IJustification); - - /** Justification reviewJustification. */ - public reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); - - /** Justification businessAvailabilityAttributesJustification. */ - public businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); - - /** Justification justification. */ - public justification?: ("reviewJustification"|"businessAvailabilityAttributesJustification"); - - /** - * Creates a new Justification instance using the specified properties. - * @param [properties] Properties to set - * @returns Justification instance - */ - public static create(properties?: google.maps.places.v1.ContextualContent.IJustification): google.maps.places.v1.ContextualContent.Justification; - - /** - * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. - * @param message Justification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. - * @param message Justification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Justification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Justification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification; - - /** - * Decodes a Justification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Justification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification; - - /** - * Verifies a Justification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Justification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Justification - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification; - - /** - * Creates a plain object from a Justification message. Also converts values to other types if specified. - * @param message Justification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent.Justification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Justification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Justification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Justification { - - /** Properties of a ReviewJustification. */ - interface IReviewJustification { - - /** ReviewJustification highlightedText */ - highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); - - /** ReviewJustification review */ - review?: (google.maps.places.v1.IReview|null); - } - - /** Represents a ReviewJustification. */ - class ReviewJustification implements IReviewJustification { - - /** - * Constructs a new ReviewJustification. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification); - - /** ReviewJustification highlightedText. */ - public highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); - - /** ReviewJustification review. */ - public review?: (google.maps.places.v1.IReview|null); - - /** - * Creates a new ReviewJustification instance using the specified properties. - * @param [properties] Properties to set - * @returns ReviewJustification instance - */ - public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - - /** - * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. - * @param message ReviewJustification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. - * @param message ReviewJustification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReviewJustification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReviewJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - - /** - * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReviewJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - - /** - * Verifies a ReviewJustification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReviewJustification - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - - /** - * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. - * @param message ReviewJustification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReviewJustification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReviewJustification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReviewJustification { - - /** Properties of a HighlightedText. */ - interface IHighlightedText { - - /** HighlightedText text */ - text?: (string|null); - - /** HighlightedText highlightedTextRanges */ - highlightedTextRanges?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]|null); - } - - /** Represents a HighlightedText. */ - class HighlightedText implements IHighlightedText { - - /** - * Constructs a new HighlightedText. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText); - - /** HighlightedText text. */ - public text: string; - - /** HighlightedText highlightedTextRanges. */ - public highlightedTextRanges: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]; - - /** - * Creates a new HighlightedText instance using the specified properties. - * @param [properties] Properties to set - * @returns HighlightedText instance - */ - public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - - /** - * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. - * @param message HighlightedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. - * @param message HighlightedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HighlightedText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HighlightedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - - /** - * Decodes a HighlightedText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HighlightedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - - /** - * Verifies a HighlightedText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HighlightedText - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - - /** - * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. - * @param message HighlightedText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HighlightedText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HighlightedText - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace HighlightedText { - - /** Properties of a HighlightedTextRange. */ - interface IHighlightedTextRange { - - /** HighlightedTextRange startIndex */ - startIndex?: (number|null); - - /** HighlightedTextRange endIndex */ - endIndex?: (number|null); - } - - /** Represents a HighlightedTextRange. */ - class HighlightedTextRange implements IHighlightedTextRange { - - /** - * Constructs a new HighlightedTextRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange); - - /** HighlightedTextRange startIndex. */ - public startIndex: number; - - /** HighlightedTextRange endIndex. */ - public endIndex: number; - - /** - * Creates a new HighlightedTextRange instance using the specified properties. - * @param [properties] Properties to set - * @returns HighlightedTextRange instance - */ - public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; - - /** - * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. - * @param message HighlightedTextRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. - * @param message HighlightedTextRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HighlightedTextRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HighlightedTextRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; - - /** - * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HighlightedTextRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; - - /** - * Verifies a HighlightedTextRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HighlightedTextRange - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; - - /** - * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. - * @param message HighlightedTextRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HighlightedTextRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HighlightedTextRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a BusinessAvailabilityAttributesJustification. */ - interface IBusinessAvailabilityAttributesJustification { - - /** BusinessAvailabilityAttributesJustification takeout */ - takeout?: (boolean|null); - - /** BusinessAvailabilityAttributesJustification delivery */ - delivery?: (boolean|null); - - /** BusinessAvailabilityAttributesJustification dineIn */ - dineIn?: (boolean|null); - } - - /** Represents a BusinessAvailabilityAttributesJustification. */ - class BusinessAvailabilityAttributesJustification implements IBusinessAvailabilityAttributesJustification { - - /** - * Constructs a new BusinessAvailabilityAttributesJustification. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification); - - /** BusinessAvailabilityAttributesJustification takeout. */ - public takeout: boolean; - - /** BusinessAvailabilityAttributesJustification delivery. */ - public delivery: boolean; - - /** BusinessAvailabilityAttributesJustification dineIn. */ - public dineIn: boolean; - - /** - * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. - * @param [properties] Properties to set - * @returns BusinessAvailabilityAttributesJustification instance - */ - public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - - /** - * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. - * @param message BusinessAvailabilityAttributesJustification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. - * @param message BusinessAvailabilityAttributesJustification message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BusinessAvailabilityAttributesJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - - /** - * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BusinessAvailabilityAttributesJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - - /** - * Verifies a BusinessAvailabilityAttributesJustification message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BusinessAvailabilityAttributesJustification - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - - /** - * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. - * @param message BusinessAvailabilityAttributesJustification - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BusinessAvailabilityAttributesJustification to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BusinessAvailabilityAttributesJustification - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - - /** Properties of a Photo. */ - interface IPhoto { - - /** Photo name */ - name?: (string|null); - - /** Photo widthPx */ - widthPx?: (number|null); - - /** Photo heightPx */ - heightPx?: (number|null); - - /** Photo authorAttributions */ - authorAttributions?: (google.maps.places.v1.IAuthorAttribution[]|null); - } - - /** Represents a Photo. */ - class Photo implements IPhoto { - - /** - * Constructs a new Photo. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IPhoto); - - /** Photo name. */ - public name: string; - - /** Photo widthPx. */ - public widthPx: number; - - /** Photo heightPx. */ - public heightPx: number; - - /** Photo authorAttributions. */ - public authorAttributions: google.maps.places.v1.IAuthorAttribution[]; - - /** - * Creates a new Photo instance using the specified properties. - * @param [properties] Properties to set - * @returns Photo instance - */ - public static create(properties?: google.maps.places.v1.IPhoto): google.maps.places.v1.Photo; - - /** - * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @param message Photo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @param message Photo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Photo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Photo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Photo; - - /** - * Decodes a Photo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Photo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Photo; - - /** - * Verifies a Photo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Photo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Photo - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Photo; - - /** - * Creates a plain object from a Photo message. Also converts values to other types if specified. - * @param message Photo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Photo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Photo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Photo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a EVChargeOptions. */ - interface IEVChargeOptions { - - /** EVChargeOptions connectorCount */ - connectorCount?: (number|null); - - /** EVChargeOptions connectorAggregation */ - connectorAggregation?: (google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]|null); - } - - /** Represents a EVChargeOptions. */ - class EVChargeOptions implements IEVChargeOptions { - - /** - * Constructs a new EVChargeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IEVChargeOptions); - - /** EVChargeOptions connectorCount. */ - public connectorCount: number; - - /** EVChargeOptions connectorAggregation. */ - public connectorAggregation: google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]; - - /** - * Creates a new EVChargeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EVChargeOptions instance - */ - public static create(properties?: google.maps.places.v1.IEVChargeOptions): google.maps.places.v1.EVChargeOptions; - - /** - * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @param message EVChargeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @param message EVChargeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a EVChargeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions; - - /** - * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions; - - /** - * Verifies a EVChargeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EVChargeOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions; - - /** - * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. - * @param message EVChargeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.EVChargeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EVChargeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EVChargeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EVChargeOptions { - - /** Properties of a ConnectorAggregation. */ - interface IConnectorAggregation { - - /** ConnectorAggregation type */ - type?: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType|null); - - /** ConnectorAggregation maxChargeRateKw */ - maxChargeRateKw?: (number|null); - - /** ConnectorAggregation count */ - count?: (number|null); - - /** ConnectorAggregation availableCount */ - availableCount?: (number|null); - - /** ConnectorAggregation outOfServiceCount */ - outOfServiceCount?: (number|null); - - /** ConnectorAggregation availabilityLastUpdateTime */ - availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a ConnectorAggregation. */ - class ConnectorAggregation implements IConnectorAggregation { - - /** - * Constructs a new ConnectorAggregation. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation); - - /** ConnectorAggregation type. */ - public type: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType); - - /** ConnectorAggregation maxChargeRateKw. */ - public maxChargeRateKw: number; - - /** ConnectorAggregation count. */ - public count: number; - - /** ConnectorAggregation availableCount. */ - public availableCount?: (number|null); - - /** ConnectorAggregation outOfServiceCount. */ - public outOfServiceCount?: (number|null); - - /** ConnectorAggregation availabilityLastUpdateTime. */ - public availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectorAggregation _availableCount. */ - public _availableCount?: "availableCount"; - - /** ConnectorAggregation _outOfServiceCount. */ - public _outOfServiceCount?: "outOfServiceCount"; - - /** - * Creates a new ConnectorAggregation instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectorAggregation instance - */ - public static create(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - - /** - * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @param message ConnectorAggregation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @param message ConnectorAggregation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectorAggregation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectorAggregation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - - /** - * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectorAggregation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - - /** - * Verifies a ConnectorAggregation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectorAggregation - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - - /** - * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. - * @param message ConnectorAggregation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.EVChargeOptions.ConnectorAggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectorAggregation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectorAggregation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** EVConnectorType enum. */ - enum EVConnectorType { - EV_CONNECTOR_TYPE_UNSPECIFIED = 0, - EV_CONNECTOR_TYPE_OTHER = 1, - EV_CONNECTOR_TYPE_J1772 = 2, - EV_CONNECTOR_TYPE_TYPE_2 = 3, - EV_CONNECTOR_TYPE_CHADEMO = 4, - EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5, - EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6, - EV_CONNECTOR_TYPE_TESLA = 7, - EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8, - EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9 - } - - /** Properties of a FuelOptions. */ - interface IFuelOptions { - - /** FuelOptions fuelPrices */ - fuelPrices?: (google.maps.places.v1.FuelOptions.IFuelPrice[]|null); - } - - /** Represents a FuelOptions. */ - class FuelOptions implements IFuelOptions { - - /** - * Constructs a new FuelOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IFuelOptions); - - /** FuelOptions fuelPrices. */ - public fuelPrices: google.maps.places.v1.FuelOptions.IFuelPrice[]; - - /** - * Creates a new FuelOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FuelOptions instance - */ - public static create(properties?: google.maps.places.v1.IFuelOptions): google.maps.places.v1.FuelOptions; - - /** - * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @param message FuelOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @param message FuelOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FuelOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions; - - /** - * Decodes a FuelOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions; - - /** - * Verifies a FuelOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FuelOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions; - - /** - * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. - * @param message FuelOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.FuelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FuelOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FuelOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FuelOptions { - - /** Properties of a FuelPrice. */ - interface IFuelPrice { - - /** FuelPrice type */ - type?: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null); - - /** FuelPrice price */ - price?: (google.type.IMoney|null); - - /** FuelPrice updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a FuelPrice. */ - class FuelPrice implements IFuelPrice { - - /** - * Constructs a new FuelPrice. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.FuelOptions.IFuelPrice); - - /** FuelPrice type. */ - public type: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType); - - /** FuelPrice price. */ - public price?: (google.type.IMoney|null); - - /** FuelPrice updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new FuelPrice instance using the specified properties. - * @param [properties] Properties to set - * @returns FuelPrice instance - */ - public static create(properties?: google.maps.places.v1.FuelOptions.IFuelPrice): google.maps.places.v1.FuelOptions.FuelPrice; - - /** - * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @param message FuelPrice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @param message FuelPrice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FuelPrice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FuelPrice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions.FuelPrice; - - /** - * Decodes a FuelPrice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FuelPrice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions.FuelPrice; - - /** - * Verifies a FuelPrice message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FuelPrice - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions.FuelPrice; - - /** - * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. - * @param message FuelPrice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.FuelOptions.FuelPrice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FuelPrice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FuelPrice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FuelPrice { - - /** FuelType enum. */ - enum FuelType { - FUEL_TYPE_UNSPECIFIED = 0, - DIESEL = 1, - REGULAR_UNLEADED = 2, - MIDGRADE = 3, - PREMIUM = 4, - SP91 = 5, - SP91_E10 = 6, - SP92 = 7, - SP95 = 8, - SP95_E10 = 9, - SP98 = 10, - SP99 = 11, - SP100 = 12, - LPG = 13, - E80 = 14, - E85 = 15, - METHANE = 16, - BIO_DIESEL = 17, - TRUCK_DIESEL = 18 - } - } - } - - /** Properties of a Circle. */ - interface ICircle { - - /** Circle center */ - center?: (google.type.ILatLng|null); - - /** Circle radius */ - radius?: (number|null); - } - - /** Represents a Circle. */ - class Circle implements ICircle { - - /** - * Constructs a new Circle. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ICircle); - - /** Circle center. */ - public center?: (google.type.ILatLng|null); - - /** Circle radius. */ - public radius: number; - - /** - * Creates a new Circle instance using the specified properties. - * @param [properties] Properties to set - * @returns Circle instance - */ - public static create(properties?: google.maps.places.v1.ICircle): google.maps.places.v1.Circle; - - /** - * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @param message Circle message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @param message Circle message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Circle message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Circle; - - /** - * Decodes a Circle message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Circle; - - /** - * Verifies a Circle message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Circle message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Circle - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Circle; - - /** - * Creates a plain object from a Circle message. Also converts values to other types if specified. - * @param message Circle - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Circle, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Circle to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Circle - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Place. */ - interface IPlace { - - /** Place name */ - name?: (string|null); - - /** Place id */ - id?: (string|null); - - /** Place displayName */ - displayName?: (google.type.ILocalizedText|null); - - /** Place types */ - types?: (string[]|null); - - /** Place primaryType */ - primaryType?: (string|null); - - /** Place primaryTypeDisplayName */ - primaryTypeDisplayName?: (google.type.ILocalizedText|null); - - /** Place nationalPhoneNumber */ - nationalPhoneNumber?: (string|null); - - /** Place internationalPhoneNumber */ - internationalPhoneNumber?: (string|null); - - /** Place formattedAddress */ - formattedAddress?: (string|null); - - /** Place shortFormattedAddress */ - shortFormattedAddress?: (string|null); - - /** Place addressComponents */ - addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null); - - /** Place plusCode */ - plusCode?: (google.maps.places.v1.Place.IPlusCode|null); - - /** Place location */ - location?: (google.type.ILatLng|null); - - /** Place viewport */ - viewport?: (google.geo.type.IViewport|null); - - /** Place rating */ - rating?: (number|null); - - /** Place googleMapsUri */ - googleMapsUri?: (string|null); - - /** Place websiteUri */ - websiteUri?: (string|null); - - /** Place reviews */ - reviews?: (google.maps.places.v1.IReview[]|null); - - /** Place regularOpeningHours */ - regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - - /** Place utcOffsetMinutes */ - utcOffsetMinutes?: (number|null); - - /** Place photos */ - photos?: (google.maps.places.v1.IPhoto[]|null); - - /** Place adrFormatAddress */ - adrFormatAddress?: (string|null); - - /** Place businessStatus */ - businessStatus?: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus|null); - - /** Place priceLevel */ - priceLevel?: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel|null); - - /** Place attributions */ - attributions?: (google.maps.places.v1.Place.IAttribution[]|null); - - /** Place userRatingCount */ - userRatingCount?: (number|null); - - /** Place iconMaskBaseUri */ - iconMaskBaseUri?: (string|null); - - /** Place iconBackgroundColor */ - iconBackgroundColor?: (string|null); - - /** Place takeout */ - takeout?: (boolean|null); - - /** Place delivery */ - delivery?: (boolean|null); - - /** Place dineIn */ - dineIn?: (boolean|null); - - /** Place curbsidePickup */ - curbsidePickup?: (boolean|null); - - /** Place reservable */ - reservable?: (boolean|null); - - /** Place servesBreakfast */ - servesBreakfast?: (boolean|null); - - /** Place servesLunch */ - servesLunch?: (boolean|null); - - /** Place servesDinner */ - servesDinner?: (boolean|null); - - /** Place servesBeer */ - servesBeer?: (boolean|null); - - /** Place servesWine */ - servesWine?: (boolean|null); - - /** Place servesBrunch */ - servesBrunch?: (boolean|null); - - /** Place servesVegetarianFood */ - servesVegetarianFood?: (boolean|null); - - /** Place currentOpeningHours */ - currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - - /** Place currentSecondaryOpeningHours */ - currentSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); - - /** Place regularSecondaryOpeningHours */ - regularSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); - - /** Place editorialSummary */ - editorialSummary?: (google.type.ILocalizedText|null); - - /** Place outdoorSeating */ - outdoorSeating?: (boolean|null); - - /** Place liveMusic */ - liveMusic?: (boolean|null); - - /** Place menuForChildren */ - menuForChildren?: (boolean|null); - - /** Place servesCocktails */ - servesCocktails?: (boolean|null); - - /** Place servesDessert */ - servesDessert?: (boolean|null); - - /** Place servesCoffee */ - servesCoffee?: (boolean|null); - - /** Place goodForChildren */ - goodForChildren?: (boolean|null); - - /** Place allowsDogs */ - allowsDogs?: (boolean|null); - - /** Place restroom */ - restroom?: (boolean|null); - - /** Place goodForGroups */ - goodForGroups?: (boolean|null); - - /** Place goodForWatchingSports */ - goodForWatchingSports?: (boolean|null); - - /** Place paymentOptions */ - paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); - - /** Place parkingOptions */ - parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); - - /** Place subDestinations */ - subDestinations?: (google.maps.places.v1.Place.ISubDestination[]|null); - - /** Place accessibilityOptions */ - accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); - - /** Place fuelOptions */ - fuelOptions?: (google.maps.places.v1.IFuelOptions|null); - - /** Place evChargeOptions */ - evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); - - /** Place generativeSummary */ - generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); - - /** Place areaSummary */ - areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); - } - - /** Represents a Place. */ - class Place implements IPlace { - - /** - * Constructs a new Place. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IPlace); - - /** Place name. */ - public name: string; - - /** Place id. */ - public id: string; - - /** Place displayName. */ - public displayName?: (google.type.ILocalizedText|null); - - /** Place types. */ - public types: string[]; - - /** Place primaryType. */ - public primaryType: string; - - /** Place primaryTypeDisplayName. */ - public primaryTypeDisplayName?: (google.type.ILocalizedText|null); - - /** Place nationalPhoneNumber. */ - public nationalPhoneNumber: string; - - /** Place internationalPhoneNumber. */ - public internationalPhoneNumber: string; - - /** Place formattedAddress. */ - public formattedAddress: string; - - /** Place shortFormattedAddress. */ - public shortFormattedAddress: string; - - /** Place addressComponents. */ - public addressComponents: google.maps.places.v1.Place.IAddressComponent[]; - - /** Place plusCode. */ - public plusCode?: (google.maps.places.v1.Place.IPlusCode|null); - - /** Place location. */ - public location?: (google.type.ILatLng|null); - - /** Place viewport. */ - public viewport?: (google.geo.type.IViewport|null); - - /** Place rating. */ - public rating: number; - - /** Place googleMapsUri. */ - public googleMapsUri: string; - - /** Place websiteUri. */ - public websiteUri: string; - - /** Place reviews. */ - public reviews: google.maps.places.v1.IReview[]; - - /** Place regularOpeningHours. */ - public regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - - /** Place utcOffsetMinutes. */ - public utcOffsetMinutes?: (number|null); - - /** Place photos. */ - public photos: google.maps.places.v1.IPhoto[]; - - /** Place adrFormatAddress. */ - public adrFormatAddress: string; - - /** Place businessStatus. */ - public businessStatus: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus); - - /** Place priceLevel. */ - public priceLevel: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel); - - /** Place attributions. */ - public attributions: google.maps.places.v1.Place.IAttribution[]; - - /** Place userRatingCount. */ - public userRatingCount?: (number|null); - - /** Place iconMaskBaseUri. */ - public iconMaskBaseUri: string; - - /** Place iconBackgroundColor. */ - public iconBackgroundColor: string; - - /** Place takeout. */ - public takeout?: (boolean|null); - - /** Place delivery. */ - public delivery?: (boolean|null); - - /** Place dineIn. */ - public dineIn?: (boolean|null); - - /** Place curbsidePickup. */ - public curbsidePickup?: (boolean|null); - - /** Place reservable. */ - public reservable?: (boolean|null); - - /** Place servesBreakfast. */ - public servesBreakfast?: (boolean|null); - - /** Place servesLunch. */ - public servesLunch?: (boolean|null); - - /** Place servesDinner. */ - public servesDinner?: (boolean|null); - - /** Place servesBeer. */ - public servesBeer?: (boolean|null); - - /** Place servesWine. */ - public servesWine?: (boolean|null); - - /** Place servesBrunch. */ - public servesBrunch?: (boolean|null); - - /** Place servesVegetarianFood. */ - public servesVegetarianFood?: (boolean|null); - - /** Place currentOpeningHours. */ - public currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - - /** Place currentSecondaryOpeningHours. */ - public currentSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; - - /** Place regularSecondaryOpeningHours. */ - public regularSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; - - /** Place editorialSummary. */ - public editorialSummary?: (google.type.ILocalizedText|null); - - /** Place outdoorSeating. */ - public outdoorSeating?: (boolean|null); - - /** Place liveMusic. */ - public liveMusic?: (boolean|null); - - /** Place menuForChildren. */ - public menuForChildren?: (boolean|null); - - /** Place servesCocktails. */ - public servesCocktails?: (boolean|null); - - /** Place servesDessert. */ - public servesDessert?: (boolean|null); - - /** Place servesCoffee. */ - public servesCoffee?: (boolean|null); - - /** Place goodForChildren. */ - public goodForChildren?: (boolean|null); - - /** Place allowsDogs. */ - public allowsDogs?: (boolean|null); - - /** Place restroom. */ - public restroom?: (boolean|null); - - /** Place goodForGroups. */ - public goodForGroups?: (boolean|null); - - /** Place goodForWatchingSports. */ - public goodForWatchingSports?: (boolean|null); - - /** Place paymentOptions. */ - public paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); - - /** Place parkingOptions. */ - public parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); - - /** Place subDestinations. */ - public subDestinations: google.maps.places.v1.Place.ISubDestination[]; - - /** Place accessibilityOptions. */ - public accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); - - /** Place fuelOptions. */ - public fuelOptions?: (google.maps.places.v1.IFuelOptions|null); - - /** Place evChargeOptions. */ - public evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); - - /** Place generativeSummary. */ - public generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); - - /** Place areaSummary. */ - public areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); - - /** Place _utcOffsetMinutes. */ - public _utcOffsetMinutes?: "utcOffsetMinutes"; - - /** Place _userRatingCount. */ - public _userRatingCount?: "userRatingCount"; - - /** Place _takeout. */ - public _takeout?: "takeout"; - - /** Place _delivery. */ - public _delivery?: "delivery"; - - /** Place _dineIn. */ - public _dineIn?: "dineIn"; - - /** Place _curbsidePickup. */ - public _curbsidePickup?: "curbsidePickup"; - - /** Place _reservable. */ - public _reservable?: "reservable"; - - /** Place _servesBreakfast. */ - public _servesBreakfast?: "servesBreakfast"; - - /** Place _servesLunch. */ - public _servesLunch?: "servesLunch"; - - /** Place _servesDinner. */ - public _servesDinner?: "servesDinner"; - - /** Place _servesBeer. */ - public _servesBeer?: "servesBeer"; - - /** Place _servesWine. */ - public _servesWine?: "servesWine"; - - /** Place _servesBrunch. */ - public _servesBrunch?: "servesBrunch"; - - /** Place _servesVegetarianFood. */ - public _servesVegetarianFood?: "servesVegetarianFood"; - - /** Place _outdoorSeating. */ - public _outdoorSeating?: "outdoorSeating"; - - /** Place _liveMusic. */ - public _liveMusic?: "liveMusic"; - - /** Place _menuForChildren. */ - public _menuForChildren?: "menuForChildren"; - - /** Place _servesCocktails. */ - public _servesCocktails?: "servesCocktails"; - - /** Place _servesDessert. */ - public _servesDessert?: "servesDessert"; - - /** Place _servesCoffee. */ - public _servesCoffee?: "servesCoffee"; - - /** Place _goodForChildren. */ - public _goodForChildren?: "goodForChildren"; - - /** Place _allowsDogs. */ - public _allowsDogs?: "allowsDogs"; - - /** Place _restroom. */ - public _restroom?: "restroom"; - - /** Place _goodForGroups. */ - public _goodForGroups?: "goodForGroups"; - - /** Place _goodForWatchingSports. */ - public _goodForWatchingSports?: "goodForWatchingSports"; - - /** Place _accessibilityOptions. */ - public _accessibilityOptions?: "accessibilityOptions"; - - /** - * Creates a new Place instance using the specified properties. - * @param [properties] Properties to set - * @returns Place instance - */ - public static create(properties?: google.maps.places.v1.IPlace): google.maps.places.v1.Place; - - /** - * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @param message Place message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @param message Place message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Place message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Place - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place; - - /** - * Decodes a Place message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Place - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place; - - /** - * Verifies a Place message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Place message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Place - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place; - - /** - * Creates a plain object from a Place message. Also converts values to other types if specified. - * @param message Place - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Place to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Place - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Place { - - /** Properties of an AddressComponent. */ - interface IAddressComponent { - - /** AddressComponent longText */ - longText?: (string|null); - - /** AddressComponent shortText */ - shortText?: (string|null); - - /** AddressComponent types */ - types?: (string[]|null); - - /** AddressComponent languageCode */ - languageCode?: (string|null); - } - - /** Represents an AddressComponent. */ - class AddressComponent implements IAddressComponent { - - /** - * Constructs a new AddressComponent. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAddressComponent); - - /** AddressComponent longText. */ - public longText: string; - - /** AddressComponent shortText. */ - public shortText: string; - - /** AddressComponent types. */ - public types: string[]; - - /** AddressComponent languageCode. */ - public languageCode: string; - - /** - * Creates a new AddressComponent instance using the specified properties. - * @param [properties] Properties to set - * @returns AddressComponent instance - */ - public static create(properties?: google.maps.places.v1.Place.IAddressComponent): google.maps.places.v1.Place.AddressComponent; - - /** - * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @param message AddressComponent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @param message AddressComponent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddressComponent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AddressComponent; - - /** - * Decodes an AddressComponent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AddressComponent; - - /** - * Verifies an AddressComponent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddressComponent - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AddressComponent; - - /** - * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. - * @param message AddressComponent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddressComponent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddressComponent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PlusCode. */ - interface IPlusCode { - - /** PlusCode globalCode */ - globalCode?: (string|null); - - /** PlusCode compoundCode */ - compoundCode?: (string|null); - } - - /** Represents a PlusCode. */ - class PlusCode implements IPlusCode { - - /** - * Constructs a new PlusCode. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IPlusCode); - - /** PlusCode globalCode. */ - public globalCode: string; - - /** PlusCode compoundCode. */ - public compoundCode: string; - - /** - * Creates a new PlusCode instance using the specified properties. - * @param [properties] Properties to set - * @returns PlusCode instance - */ - public static create(properties?: google.maps.places.v1.Place.IPlusCode): google.maps.places.v1.Place.PlusCode; - - /** - * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @param message PlusCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @param message PlusCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlusCode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PlusCode; - - /** - * Decodes a PlusCode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PlusCode; - - /** - * Verifies a PlusCode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlusCode - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PlusCode; - - /** - * Creates a plain object from a PlusCode message. Also converts values to other types if specified. - * @param message PlusCode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlusCode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlusCode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an OpeningHours. */ - interface IOpeningHours { - - /** OpeningHours openNow */ - openNow?: (boolean|null); - - /** OpeningHours periods */ - periods?: (google.maps.places.v1.Place.OpeningHours.IPeriod[]|null); - - /** OpeningHours weekdayDescriptions */ - weekdayDescriptions?: (string[]|null); - - /** OpeningHours secondaryHoursType */ - secondaryHoursType?: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null); - - /** OpeningHours specialDays */ - specialDays?: (google.maps.places.v1.Place.OpeningHours.ISpecialDay[]|null); - } - - /** Represents an OpeningHours. */ - class OpeningHours implements IOpeningHours { - - /** - * Constructs a new OpeningHours. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IOpeningHours); - - /** OpeningHours openNow. */ - public openNow?: (boolean|null); - - /** OpeningHours periods. */ - public periods: google.maps.places.v1.Place.OpeningHours.IPeriod[]; - - /** OpeningHours weekdayDescriptions. */ - public weekdayDescriptions: string[]; - - /** OpeningHours secondaryHoursType. */ - public secondaryHoursType: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType); - - /** OpeningHours specialDays. */ - public specialDays: google.maps.places.v1.Place.OpeningHours.ISpecialDay[]; - - /** OpeningHours _openNow. */ - public _openNow?: "openNow"; - - /** - * Creates a new OpeningHours instance using the specified properties. - * @param [properties] Properties to set - * @returns OpeningHours instance - */ - public static create(properties?: google.maps.places.v1.Place.IOpeningHours): google.maps.places.v1.Place.OpeningHours; - - /** - * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @param message OpeningHours message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @param message OpeningHours message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OpeningHours message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours; - - /** - * Decodes an OpeningHours message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours; - - /** - * Verifies an OpeningHours message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OpeningHours - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours; - - /** - * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. - * @param message OpeningHours - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OpeningHours to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OpeningHours - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace OpeningHours { - - /** Properties of a Period. */ - interface IPeriod { - - /** Period open */ - open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - - /** Period close */ - close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - } - - /** Represents a Period. */ - class Period implements IPeriod { - - /** - * Constructs a new Period. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod); - - /** Period open. */ - public open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - - /** Period close. */ - public close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - - /** - * Creates a new Period instance using the specified properties. - * @param [properties] Properties to set - * @returns Period instance - */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod): google.maps.places.v1.Place.OpeningHours.Period; - - /** - * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Period message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period; - - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period; - - /** - * Verifies a Period message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Period - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period; - - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @param message Period - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Period to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Period - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Period { - - /** Properties of a Point. */ - interface IPoint { - - /** Point day */ - day?: (number|null); - - /** Point hour */ - hour?: (number|null); - - /** Point minute */ - minute?: (number|null); - - /** Point date */ - date?: (google.type.IDate|null); - - /** Point truncated */ - truncated?: (boolean|null); - } - - /** Represents a Point. */ - class Point implements IPoint { - - /** - * Constructs a new Point. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint); - - /** Point day. */ - public day?: (number|null); - - /** Point hour. */ - public hour?: (number|null); - - /** Point minute. */ - public minute?: (number|null); - - /** Point date. */ - public date?: (google.type.IDate|null); - - /** Point truncated. */ - public truncated: boolean; - - /** Point _day. */ - public _day?: "day"; - - /** Point _hour. */ - public _hour?: "hour"; - - /** Point _minute. */ - public _minute?: "minute"; - - /** - * Creates a new Point instance using the specified properties. - * @param [properties] Properties to set - * @returns Point instance - */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint): google.maps.places.v1.Place.OpeningHours.Period.Point; - - /** - * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Point message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period.Point; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period.Point; - - /** - * Verifies a Point message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Point - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period.Point; - - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @param message Point - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Point to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Point - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** SecondaryHoursType enum. */ - enum SecondaryHoursType { - SECONDARY_HOURS_TYPE_UNSPECIFIED = 0, - DRIVE_THROUGH = 1, - HAPPY_HOUR = 2, - DELIVERY = 3, - TAKEOUT = 4, - KITCHEN = 5, - BREAKFAST = 6, - LUNCH = 7, - DINNER = 8, - BRUNCH = 9, - PICKUP = 10, - ACCESS = 11, - SENIOR_HOURS = 12, - ONLINE_SERVICE_HOURS = 13 - } - - /** Properties of a SpecialDay. */ - interface ISpecialDay { - - /** SpecialDay date */ - date?: (google.type.IDate|null); - } - - /** Represents a SpecialDay. */ - class SpecialDay implements ISpecialDay { - - /** - * Constructs a new SpecialDay. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay); - - /** SpecialDay date. */ - public date?: (google.type.IDate|null); - - /** - * Creates a new SpecialDay instance using the specified properties. - * @param [properties] Properties to set - * @returns SpecialDay instance - */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay): google.maps.places.v1.Place.OpeningHours.SpecialDay; - - /** - * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @param message SpecialDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @param message SpecialDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SpecialDay message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.SpecialDay; - - /** - * Decodes a SpecialDay message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.SpecialDay; - - /** - * Verifies a SpecialDay message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpecialDay - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.SpecialDay; - - /** - * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. - * @param message SpecialDay - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.SpecialDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SpecialDay to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SpecialDay - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** BusinessStatus enum. */ - enum BusinessStatus { - BUSINESS_STATUS_UNSPECIFIED = 0, - OPERATIONAL = 1, - CLOSED_TEMPORARILY = 2, - CLOSED_PERMANENTLY = 3 - } - - /** Properties of an Attribution. */ - interface IAttribution { - - /** Attribution provider */ - provider?: (string|null); - - /** Attribution providerUri */ - providerUri?: (string|null); - } - - /** Represents an Attribution. */ - class Attribution implements IAttribution { - - /** - * Constructs a new Attribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAttribution); - - /** Attribution provider. */ - public provider: string; - - /** Attribution providerUri. */ - public providerUri: string; - - /** - * Creates a new Attribution instance using the specified properties. - * @param [properties] Properties to set - * @returns Attribution instance - */ - public static create(properties?: google.maps.places.v1.Place.IAttribution): google.maps.places.v1.Place.Attribution; - - /** - * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @param message Attribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @param message Attribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Attribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.Attribution; - - /** - * Decodes an Attribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.Attribution; - - /** - * Verifies an Attribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Attribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Attribution - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Attribution; - - /** - * Creates a plain object from an Attribution message. Also converts values to other types if specified. - * @param message Attribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.Attribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Attribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Attribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PaymentOptions. */ - interface IPaymentOptions { - - /** PaymentOptions acceptsCreditCards */ - acceptsCreditCards?: (boolean|null); - - /** PaymentOptions acceptsDebitCards */ - acceptsDebitCards?: (boolean|null); - - /** PaymentOptions acceptsCashOnly */ - acceptsCashOnly?: (boolean|null); - - /** PaymentOptions acceptsNfc */ - acceptsNfc?: (boolean|null); - } - - /** Represents a PaymentOptions. */ - class PaymentOptions implements IPaymentOptions { - - /** - * Constructs a new PaymentOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IPaymentOptions); - - /** PaymentOptions acceptsCreditCards. */ - public acceptsCreditCards?: (boolean|null); - - /** PaymentOptions acceptsDebitCards. */ - public acceptsDebitCards?: (boolean|null); - - /** PaymentOptions acceptsCashOnly. */ - public acceptsCashOnly?: (boolean|null); - - /** PaymentOptions acceptsNfc. */ - public acceptsNfc?: (boolean|null); - - /** PaymentOptions _acceptsCreditCards. */ - public _acceptsCreditCards?: "acceptsCreditCards"; - - /** PaymentOptions _acceptsDebitCards. */ - public _acceptsDebitCards?: "acceptsDebitCards"; - - /** PaymentOptions _acceptsCashOnly. */ - public _acceptsCashOnly?: "acceptsCashOnly"; - - /** PaymentOptions _acceptsNfc. */ - public _acceptsNfc?: "acceptsNfc"; - - /** - * Creates a new PaymentOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns PaymentOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IPaymentOptions): google.maps.places.v1.Place.PaymentOptions; - - /** - * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @param message PaymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @param message PaymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PaymentOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PaymentOptions; - - /** - * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PaymentOptions; - - /** - * Verifies a PaymentOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PaymentOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PaymentOptions; - - /** - * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. - * @param message PaymentOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.PaymentOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PaymentOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PaymentOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ParkingOptions. */ - interface IParkingOptions { - - /** ParkingOptions freeParkingLot */ - freeParkingLot?: (boolean|null); - - /** ParkingOptions paidParkingLot */ - paidParkingLot?: (boolean|null); - - /** ParkingOptions freeStreetParking */ - freeStreetParking?: (boolean|null); - - /** ParkingOptions paidStreetParking */ - paidStreetParking?: (boolean|null); - - /** ParkingOptions valetParking */ - valetParking?: (boolean|null); - - /** ParkingOptions freeGarageParking */ - freeGarageParking?: (boolean|null); - - /** ParkingOptions paidGarageParking */ - paidGarageParking?: (boolean|null); - } - - /** Represents a ParkingOptions. */ - class ParkingOptions implements IParkingOptions { - - /** - * Constructs a new ParkingOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IParkingOptions); - - /** ParkingOptions freeParkingLot. */ - public freeParkingLot?: (boolean|null); - - /** ParkingOptions paidParkingLot. */ - public paidParkingLot?: (boolean|null); - - /** ParkingOptions freeStreetParking. */ - public freeStreetParking?: (boolean|null); - - /** ParkingOptions paidStreetParking. */ - public paidStreetParking?: (boolean|null); - - /** ParkingOptions valetParking. */ - public valetParking?: (boolean|null); - - /** ParkingOptions freeGarageParking. */ - public freeGarageParking?: (boolean|null); - - /** ParkingOptions paidGarageParking. */ - public paidGarageParking?: (boolean|null); - - /** ParkingOptions _freeParkingLot. */ - public _freeParkingLot?: "freeParkingLot"; - - /** ParkingOptions _paidParkingLot. */ - public _paidParkingLot?: "paidParkingLot"; - - /** ParkingOptions _freeStreetParking. */ - public _freeStreetParking?: "freeStreetParking"; - - /** ParkingOptions _paidStreetParking. */ - public _paidStreetParking?: "paidStreetParking"; - - /** ParkingOptions _valetParking. */ - public _valetParking?: "valetParking"; - - /** ParkingOptions _freeGarageParking. */ - public _freeGarageParking?: "freeGarageParking"; - - /** ParkingOptions _paidGarageParking. */ - public _paidGarageParking?: "paidGarageParking"; - - /** - * Creates a new ParkingOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ParkingOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IParkingOptions): google.maps.places.v1.Place.ParkingOptions; - - /** - * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @param message ParkingOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @param message ParkingOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParkingOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.ParkingOptions; - - /** - * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.ParkingOptions; - - /** - * Verifies a ParkingOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParkingOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.ParkingOptions; - - /** - * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. - * @param message ParkingOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.ParkingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParkingOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ParkingOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SubDestination. */ - interface ISubDestination { - - /** SubDestination name */ - name?: (string|null); - - /** SubDestination id */ - id?: (string|null); - } - - /** Represents a SubDestination. */ - class SubDestination implements ISubDestination { - - /** - * Constructs a new SubDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.ISubDestination); - - /** SubDestination name. */ - public name: string; - - /** SubDestination id. */ - public id: string; - - /** - * Creates a new SubDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns SubDestination instance - */ - public static create(properties?: google.maps.places.v1.Place.ISubDestination): google.maps.places.v1.Place.SubDestination; - - /** - * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @param message SubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @param message SubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SubDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.SubDestination; - - /** - * Decodes a SubDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.SubDestination; - - /** - * Verifies a SubDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SubDestination - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.SubDestination; - - /** - * Creates a plain object from a SubDestination message. Also converts values to other types if specified. - * @param message SubDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.SubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SubDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SubDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AccessibilityOptions. */ - interface IAccessibilityOptions { - - /** AccessibilityOptions wheelchairAccessibleParking */ - wheelchairAccessibleParking?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleEntrance */ - wheelchairAccessibleEntrance?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleRestroom */ - wheelchairAccessibleRestroom?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleSeating */ - wheelchairAccessibleSeating?: (boolean|null); - } - - /** Represents an AccessibilityOptions. */ - class AccessibilityOptions implements IAccessibilityOptions { - - /** - * Constructs a new AccessibilityOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAccessibilityOptions); - - /** AccessibilityOptions wheelchairAccessibleParking. */ - public wheelchairAccessibleParking?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleEntrance. */ - public wheelchairAccessibleEntrance?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleRestroom. */ - public wheelchairAccessibleRestroom?: (boolean|null); - - /** AccessibilityOptions wheelchairAccessibleSeating. */ - public wheelchairAccessibleSeating?: (boolean|null); - - /** AccessibilityOptions _wheelchairAccessibleParking. */ - public _wheelchairAccessibleParking?: "wheelchairAccessibleParking"; - - /** AccessibilityOptions _wheelchairAccessibleEntrance. */ - public _wheelchairAccessibleEntrance?: "wheelchairAccessibleEntrance"; - - /** AccessibilityOptions _wheelchairAccessibleRestroom. */ - public _wheelchairAccessibleRestroom?: "wheelchairAccessibleRestroom"; - - /** AccessibilityOptions _wheelchairAccessibleSeating. */ - public _wheelchairAccessibleSeating?: "wheelchairAccessibleSeating"; - - /** - * Creates a new AccessibilityOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessibilityOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IAccessibilityOptions): google.maps.places.v1.Place.AccessibilityOptions; - - /** - * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @param message AccessibilityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @param message AccessibilityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AccessibilityOptions; - - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AccessibilityOptions; - - /** - * Verifies an AccessibilityOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessibilityOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AccessibilityOptions; - - /** - * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. - * @param message AccessibilityOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.AccessibilityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccessibilityOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccessibilityOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GenerativeSummary. */ - interface IGenerativeSummary { - - /** GenerativeSummary overview */ - overview?: (google.type.ILocalizedText|null); - - /** GenerativeSummary description */ - description?: (google.type.ILocalizedText|null); - - /** GenerativeSummary references */ - references?: (google.maps.places.v1.IReferences|null); - } - - /** Represents a GenerativeSummary. */ - class GenerativeSummary implements IGenerativeSummary { - - /** - * Constructs a new GenerativeSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IGenerativeSummary); - - /** GenerativeSummary overview. */ - public overview?: (google.type.ILocalizedText|null); - - /** GenerativeSummary description. */ - public description?: (google.type.ILocalizedText|null); - - /** GenerativeSummary references. */ - public references?: (google.maps.places.v1.IReferences|null); - - /** - * Creates a new GenerativeSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns GenerativeSummary instance - */ - public static create(properties?: google.maps.places.v1.Place.IGenerativeSummary): google.maps.places.v1.Place.GenerativeSummary; - - /** - * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. - * @param message GenerativeSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. - * @param message GenerativeSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenerativeSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenerativeSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.GenerativeSummary; - - /** - * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenerativeSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.GenerativeSummary; - - /** - * Verifies a GenerativeSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenerativeSummary - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.GenerativeSummary; - - /** - * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. - * @param message GenerativeSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.GenerativeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenerativeSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GenerativeSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AreaSummary. */ - interface IAreaSummary { - - /** AreaSummary contentBlocks */ - contentBlocks?: (google.maps.places.v1.IContentBlock[]|null); - } - - /** Represents an AreaSummary. */ - class AreaSummary implements IAreaSummary { - - /** - * Constructs a new AreaSummary. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAreaSummary); - - /** AreaSummary contentBlocks. */ - public contentBlocks: google.maps.places.v1.IContentBlock[]; - - /** - * Creates a new AreaSummary instance using the specified properties. - * @param [properties] Properties to set - * @returns AreaSummary instance - */ - public static create(properties?: google.maps.places.v1.Place.IAreaSummary): google.maps.places.v1.Place.AreaSummary; - - /** - * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. - * @param message AreaSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. - * @param message AreaSummary message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AreaSummary message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AreaSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AreaSummary; - - /** - * Decodes an AreaSummary message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AreaSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AreaSummary; - - /** - * Verifies an AreaSummary message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AreaSummary - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AreaSummary; - - /** - * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. - * @param message AreaSummary - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.AreaSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AreaSummary to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AreaSummary - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** PriceLevel enum. */ - enum PriceLevel { - PRICE_LEVEL_UNSPECIFIED = 0, - PRICE_LEVEL_FREE = 1, - PRICE_LEVEL_INEXPENSIVE = 2, - PRICE_LEVEL_MODERATE = 3, - PRICE_LEVEL_EXPENSIVE = 4, - PRICE_LEVEL_VERY_EXPENSIVE = 5 - } - - /** Represents a Places */ - class Places extends $protobuf.rpc.Service { - - /** - * Constructs a new Places service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Places service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Places; - - /** - * Calls SearchNearby. - * @param request SearchNearbyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchNearbyResponse - */ - public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest, callback: google.maps.places.v1.Places.SearchNearbyCallback): void; - - /** - * Calls SearchNearby. - * @param request SearchNearbyRequest message or plain object - * @returns Promise - */ - public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest): Promise; - - /** - * Calls SearchText. - * @param request SearchTextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchTextResponse - */ - public searchText(request: google.maps.places.v1.ISearchTextRequest, callback: google.maps.places.v1.Places.SearchTextCallback): void; - - /** - * Calls SearchText. - * @param request SearchTextRequest message or plain object - * @returns Promise - */ - public searchText(request: google.maps.places.v1.ISearchTextRequest): Promise; - - /** - * Calls GetPhotoMedia. - * @param request GetPhotoMediaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PhotoMedia - */ - public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest, callback: google.maps.places.v1.Places.GetPhotoMediaCallback): void; - - /** - * Calls GetPhotoMedia. - * @param request GetPhotoMediaRequest message or plain object - * @returns Promise - */ - public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest): Promise; - - /** - * Calls GetPlace. - * @param request GetPlaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Place - */ - public getPlace(request: google.maps.places.v1.IGetPlaceRequest, callback: google.maps.places.v1.Places.GetPlaceCallback): void; - - /** - * Calls GetPlace. - * @param request GetPlaceRequest message or plain object - * @returns Promise - */ - public getPlace(request: google.maps.places.v1.IGetPlaceRequest): Promise; - - /** - * Calls AutocompletePlaces. - * @param request AutocompletePlacesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AutocompletePlacesResponse - */ - public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest, callback: google.maps.places.v1.Places.AutocompletePlacesCallback): void; - - /** - * Calls AutocompletePlaces. - * @param request AutocompletePlacesRequest message or plain object - * @returns Promise - */ - public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest): Promise; - } - - namespace Places { - - /** - * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. - * @param error Error, if any - * @param [response] SearchNearbyResponse - */ - type SearchNearbyCallback = (error: (Error|null), response?: google.maps.places.v1.SearchNearbyResponse) => void; - - /** - * Callback as used by {@link google.maps.places.v1.Places|searchText}. - * @param error Error, if any - * @param [response] SearchTextResponse - */ - type SearchTextCallback = (error: (Error|null), response?: google.maps.places.v1.SearchTextResponse) => void; - - /** - * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. - * @param error Error, if any - * @param [response] PhotoMedia - */ - type GetPhotoMediaCallback = (error: (Error|null), response?: google.maps.places.v1.PhotoMedia) => void; - - /** - * Callback as used by {@link google.maps.places.v1.Places|getPlace}. - * @param error Error, if any - * @param [response] Place - */ - type GetPlaceCallback = (error: (Error|null), response?: google.maps.places.v1.Place) => void; - - /** - * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. - * @param error Error, if any - * @param [response] AutocompletePlacesResponse - */ - type AutocompletePlacesCallback = (error: (Error|null), response?: google.maps.places.v1.AutocompletePlacesResponse) => void; - } - - /** Properties of a SearchNearbyRequest. */ - interface ISearchNearbyRequest { - - /** SearchNearbyRequest languageCode */ - languageCode?: (string|null); - - /** SearchNearbyRequest regionCode */ - regionCode?: (string|null); - - /** SearchNearbyRequest includedTypes */ - includedTypes?: (string[]|null); - - /** SearchNearbyRequest excludedTypes */ - excludedTypes?: (string[]|null); - - /** SearchNearbyRequest includedPrimaryTypes */ - includedPrimaryTypes?: (string[]|null); - - /** SearchNearbyRequest excludedPrimaryTypes */ - excludedPrimaryTypes?: (string[]|null); - - /** SearchNearbyRequest maxResultCount */ - maxResultCount?: (number|null); - - /** SearchNearbyRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); - - /** SearchNearbyRequest rankPreference */ - rankPreference?: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference|null); - } - - /** Represents a SearchNearbyRequest. */ - class SearchNearbyRequest implements ISearchNearbyRequest { - - /** - * Constructs a new SearchNearbyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchNearbyRequest); - - /** SearchNearbyRequest languageCode. */ - public languageCode: string; - - /** SearchNearbyRequest regionCode. */ - public regionCode: string; - - /** SearchNearbyRequest includedTypes. */ - public includedTypes: string[]; - - /** SearchNearbyRequest excludedTypes. */ - public excludedTypes: string[]; - - /** SearchNearbyRequest includedPrimaryTypes. */ - public includedPrimaryTypes: string[]; - - /** SearchNearbyRequest excludedPrimaryTypes. */ - public excludedPrimaryTypes: string[]; - - /** SearchNearbyRequest maxResultCount. */ - public maxResultCount: number; - - /** SearchNearbyRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); - - /** SearchNearbyRequest rankPreference. */ - public rankPreference: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference); - - /** - * Creates a new SearchNearbyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchNearbyRequest instance - */ - public static create(properties?: google.maps.places.v1.ISearchNearbyRequest): google.maps.places.v1.SearchNearbyRequest; - - /** - * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @param message SearchNearbyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @param message SearchNearbyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest; - - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest; - - /** - * Verifies a SearchNearbyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchNearbyRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest; - - /** - * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. - * @param message SearchNearbyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchNearbyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchNearbyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SearchNearbyRequest { - - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { - - /** LocationRestriction circle */ - circle?: (google.maps.places.v1.ICircle|null); - } - - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { - - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction); - - /** LocationRestriction circle. */ - public circle?: (google.maps.places.v1.ICircle|null); - - /** LocationRestriction type. */ - public type?: "circle"; - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** RankPreference enum. */ - enum RankPreference { - RANK_PREFERENCE_UNSPECIFIED = 0, - DISTANCE = 1, - POPULARITY = 2 - } - } - - /** Properties of a SearchNearbyResponse. */ - interface ISearchNearbyResponse { - - /** SearchNearbyResponse places */ - places?: (google.maps.places.v1.IPlace[]|null); - } - - /** Represents a SearchNearbyResponse. */ - class SearchNearbyResponse implements ISearchNearbyResponse { - - /** - * Constructs a new SearchNearbyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchNearbyResponse); - - /** SearchNearbyResponse places. */ - public places: google.maps.places.v1.IPlace[]; - - /** - * Creates a new SearchNearbyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchNearbyResponse instance - */ - public static create(properties?: google.maps.places.v1.ISearchNearbyResponse): google.maps.places.v1.SearchNearbyResponse; - - /** - * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @param message SearchNearbyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @param message SearchNearbyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyResponse; - - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyResponse; - - /** - * Verifies a SearchNearbyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchNearbyResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyResponse; - - /** - * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. - * @param message SearchNearbyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchNearbyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchNearbyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SearchTextRequest. */ - interface ISearchTextRequest { - - /** SearchTextRequest textQuery */ - textQuery?: (string|null); - - /** SearchTextRequest languageCode */ - languageCode?: (string|null); - - /** SearchTextRequest regionCode */ - regionCode?: (string|null); - - /** SearchTextRequest rankPreference */ - rankPreference?: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference|null); - - /** SearchTextRequest includedType */ - includedType?: (string|null); - - /** SearchTextRequest openNow */ - openNow?: (boolean|null); - - /** SearchTextRequest minRating */ - minRating?: (number|null); - - /** SearchTextRequest maxResultCount */ - maxResultCount?: (number|null); - - /** SearchTextRequest priceLevels */ - priceLevels?: (google.maps.places.v1.PriceLevel[]|null); - - /** SearchTextRequest strictTypeFiltering */ - strictTypeFiltering?: (boolean|null); - - /** SearchTextRequest locationBias */ - locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); - - /** SearchTextRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); - - /** SearchTextRequest evOptions */ - evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); - } - - /** Represents a SearchTextRequest. */ - class SearchTextRequest implements ISearchTextRequest { - - /** - * Constructs a new SearchTextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchTextRequest); - - /** SearchTextRequest textQuery. */ - public textQuery: string; - - /** SearchTextRequest languageCode. */ - public languageCode: string; - - /** SearchTextRequest regionCode. */ - public regionCode: string; - - /** SearchTextRequest rankPreference. */ - public rankPreference: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference); - - /** SearchTextRequest includedType. */ - public includedType: string; - - /** SearchTextRequest openNow. */ - public openNow: boolean; - - /** SearchTextRequest minRating. */ - public minRating: number; - - /** SearchTextRequest maxResultCount. */ - public maxResultCount: number; - - /** SearchTextRequest priceLevels. */ - public priceLevels: google.maps.places.v1.PriceLevel[]; - - /** SearchTextRequest strictTypeFiltering. */ - public strictTypeFiltering: boolean; - - /** SearchTextRequest locationBias. */ - public locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); - - /** SearchTextRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); - - /** SearchTextRequest evOptions. */ - public evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); - - /** - * Creates a new SearchTextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchTextRequest instance - */ - public static create(properties?: google.maps.places.v1.ISearchTextRequest): google.maps.places.v1.SearchTextRequest; - - /** - * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @param message SearchTextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @param message SearchTextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchTextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest; - - /** - * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest; - - /** - * Verifies a SearchTextRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchTextRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest; - - /** - * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. - * @param message SearchTextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchTextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchTextRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SearchTextRequest { - - /** RankPreference enum. */ - enum RankPreference { - RANK_PREFERENCE_UNSPECIFIED = 0, - DISTANCE = 1, - RELEVANCE = 2 - } - - /** Properties of a LocationBias. */ - interface ILocationBias { - - /** LocationBias rectangle */ - rectangle?: (google.geo.type.IViewport|null); - - /** LocationBias circle */ - circle?: (google.maps.places.v1.ICircle|null); - } - - /** Represents a LocationBias. */ - class LocationBias implements ILocationBias { - - /** - * Constructs a new LocationBias. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias); - - /** LocationBias rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); - - /** LocationBias circle. */ - public circle?: (google.maps.places.v1.ICircle|null); - - /** LocationBias type. */ - public type?: ("rectangle"|"circle"); - - /** - * Creates a new LocationBias instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationBias instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias): google.maps.places.v1.SearchTextRequest.LocationBias; - - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationBias; - - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationBias; - - /** - * Verifies a LocationBias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationBias - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationBias; - - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @param message LocationBias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationBias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationBias - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { - - /** LocationRestriction rectangle */ - rectangle?: (google.geo.type.IViewport|null); - } - - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { - - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction); - - /** LocationRestriction rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); - - /** LocationRestriction type. */ - public type?: "rectangle"; - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction): google.maps.places.v1.SearchTextRequest.LocationRestriction; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationRestriction; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationRestriction; - - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationRestriction; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a EVOptions. */ - interface IEVOptions { - - /** EVOptions minimumChargingRateKw */ - minimumChargingRateKw?: (number|null); - - /** EVOptions connectorTypes */ - connectorTypes?: (google.maps.places.v1.EVConnectorType[]|null); - } - - /** Represents a EVOptions. */ - class EVOptions implements IEVOptions { - - /** - * Constructs a new EVOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions); - - /** EVOptions minimumChargingRateKw. */ - public minimumChargingRateKw: number; - - /** EVOptions connectorTypes. */ - public connectorTypes: google.maps.places.v1.EVConnectorType[]; - - /** - * Creates a new EVOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EVOptions instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions): google.maps.places.v1.SearchTextRequest.EVOptions; - - /** - * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @param message EVOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @param message EVOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a EVOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.EVOptions; - - /** - * Decodes a EVOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.EVOptions; - - /** - * Verifies a EVOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EVOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.EVOptions; - - /** - * Creates a plain object from a EVOptions message. Also converts values to other types if specified. - * @param message EVOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.EVOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EVOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EVOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchTextResponse. */ - interface ISearchTextResponse { - - /** SearchTextResponse places */ - places?: (google.maps.places.v1.IPlace[]|null); - - /** SearchTextResponse contextualContents */ - contextualContents?: (google.maps.places.v1.IContextualContent[]|null); - } - - /** Represents a SearchTextResponse. */ - class SearchTextResponse implements ISearchTextResponse { - - /** - * Constructs a new SearchTextResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchTextResponse); - - /** SearchTextResponse places. */ - public places: google.maps.places.v1.IPlace[]; - - /** SearchTextResponse contextualContents. */ - public contextualContents: google.maps.places.v1.IContextualContent[]; - - /** - * Creates a new SearchTextResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchTextResponse instance - */ - public static create(properties?: google.maps.places.v1.ISearchTextResponse): google.maps.places.v1.SearchTextResponse; - - /** - * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @param message SearchTextResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @param message SearchTextResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchTextResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextResponse; - - /** - * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextResponse; - - /** - * Verifies a SearchTextResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchTextResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextResponse; - - /** - * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. - * @param message SearchTextResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SearchTextResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SearchTextResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPhotoMediaRequest. */ - interface IGetPhotoMediaRequest { - - /** GetPhotoMediaRequest name */ - name?: (string|null); - - /** GetPhotoMediaRequest maxWidthPx */ - maxWidthPx?: (number|null); - - /** GetPhotoMediaRequest maxHeightPx */ - maxHeightPx?: (number|null); - - /** GetPhotoMediaRequest skipHttpRedirect */ - skipHttpRedirect?: (boolean|null); - } - - /** Represents a GetPhotoMediaRequest. */ - class GetPhotoMediaRequest implements IGetPhotoMediaRequest { - - /** - * Constructs a new GetPhotoMediaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IGetPhotoMediaRequest); - - /** GetPhotoMediaRequest name. */ - public name: string; - - /** GetPhotoMediaRequest maxWidthPx. */ - public maxWidthPx: number; - - /** GetPhotoMediaRequest maxHeightPx. */ - public maxHeightPx: number; - - /** GetPhotoMediaRequest skipHttpRedirect. */ - public skipHttpRedirect: boolean; - - /** - * Creates a new GetPhotoMediaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPhotoMediaRequest instance - */ - public static create(properties?: google.maps.places.v1.IGetPhotoMediaRequest): google.maps.places.v1.GetPhotoMediaRequest; - - /** - * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @param message GetPhotoMediaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @param message GetPhotoMediaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPhotoMediaRequest; - - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPhotoMediaRequest; - - /** - * Verifies a GetPhotoMediaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPhotoMediaRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPhotoMediaRequest; - - /** - * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. - * @param message GetPhotoMediaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.GetPhotoMediaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPhotoMediaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPhotoMediaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhotoMedia. */ - interface IPhotoMedia { - - /** PhotoMedia name */ - name?: (string|null); - - /** PhotoMedia photoUri */ - photoUri?: (string|null); - } - - /** Represents a PhotoMedia. */ - class PhotoMedia implements IPhotoMedia { - - /** - * Constructs a new PhotoMedia. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IPhotoMedia); - - /** PhotoMedia name. */ - public name: string; - - /** PhotoMedia photoUri. */ - public photoUri: string; - - /** - * Creates a new PhotoMedia instance using the specified properties. - * @param [properties] Properties to set - * @returns PhotoMedia instance - */ - public static create(properties?: google.maps.places.v1.IPhotoMedia): google.maps.places.v1.PhotoMedia; - - /** - * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @param message PhotoMedia message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @param message PhotoMedia message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhotoMedia message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.PhotoMedia; - - /** - * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.PhotoMedia; - - /** - * Verifies a PhotoMedia message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhotoMedia - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.PhotoMedia; - - /** - * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. - * @param message PhotoMedia - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.PhotoMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhotoMedia to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhotoMedia - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPlaceRequest. */ - interface IGetPlaceRequest { - - /** GetPlaceRequest name */ - name?: (string|null); - - /** GetPlaceRequest languageCode */ - languageCode?: (string|null); - - /** GetPlaceRequest regionCode */ - regionCode?: (string|null); - - /** GetPlaceRequest sessionToken */ - sessionToken?: (string|null); - } - - /** Represents a GetPlaceRequest. */ - class GetPlaceRequest implements IGetPlaceRequest { - - /** - * Constructs a new GetPlaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IGetPlaceRequest); - - /** GetPlaceRequest name. */ - public name: string; - - /** GetPlaceRequest languageCode. */ - public languageCode: string; - - /** GetPlaceRequest regionCode. */ - public regionCode: string; - - /** GetPlaceRequest sessionToken. */ - public sessionToken: string; - - /** - * Creates a new GetPlaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPlaceRequest instance - */ - public static create(properties?: google.maps.places.v1.IGetPlaceRequest): google.maps.places.v1.GetPlaceRequest; - - /** - * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @param message GetPlaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @param message GetPlaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPlaceRequest; - - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPlaceRequest; - - /** - * Verifies a GetPlaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPlaceRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPlaceRequest; - - /** - * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. - * @param message GetPlaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.GetPlaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPlaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPlaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AutocompletePlacesRequest. */ - interface IAutocompletePlacesRequest { - - /** AutocompletePlacesRequest input */ - input?: (string|null); - - /** AutocompletePlacesRequest locationBias */ - locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); - - /** AutocompletePlacesRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); - - /** AutocompletePlacesRequest includedPrimaryTypes */ - includedPrimaryTypes?: (string[]|null); - - /** AutocompletePlacesRequest includedRegionCodes */ - includedRegionCodes?: (string[]|null); - - /** AutocompletePlacesRequest languageCode */ - languageCode?: (string|null); - - /** AutocompletePlacesRequest regionCode */ - regionCode?: (string|null); - - /** AutocompletePlacesRequest origin */ - origin?: (google.type.ILatLng|null); - - /** AutocompletePlacesRequest inputOffset */ - inputOffset?: (number|null); - - /** AutocompletePlacesRequest includeQueryPredictions */ - includeQueryPredictions?: (boolean|null); - - /** AutocompletePlacesRequest sessionToken */ - sessionToken?: (string|null); - } - - /** Represents an AutocompletePlacesRequest. */ - class AutocompletePlacesRequest implements IAutocompletePlacesRequest { - - /** - * Constructs a new AutocompletePlacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IAutocompletePlacesRequest); - - /** AutocompletePlacesRequest input. */ - public input: string; - - /** AutocompletePlacesRequest locationBias. */ - public locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); - - /** AutocompletePlacesRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); - - /** AutocompletePlacesRequest includedPrimaryTypes. */ - public includedPrimaryTypes: string[]; - - /** AutocompletePlacesRequest includedRegionCodes. */ - public includedRegionCodes: string[]; - - /** AutocompletePlacesRequest languageCode. */ - public languageCode: string; - - /** AutocompletePlacesRequest regionCode. */ - public regionCode: string; - - /** AutocompletePlacesRequest origin. */ - public origin?: (google.type.ILatLng|null); - - /** AutocompletePlacesRequest inputOffset. */ - public inputOffset: number; - - /** AutocompletePlacesRequest includeQueryPredictions. */ - public includeQueryPredictions: boolean; - - /** AutocompletePlacesRequest sessionToken. */ - public sessionToken: string; - - /** - * Creates a new AutocompletePlacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AutocompletePlacesRequest instance - */ - public static create(properties?: google.maps.places.v1.IAutocompletePlacesRequest): google.maps.places.v1.AutocompletePlacesRequest; - - /** - * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @param message AutocompletePlacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @param message AutocompletePlacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest; - - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest; - - /** - * Verifies an AutocompletePlacesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutocompletePlacesRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest; - - /** - * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. - * @param message AutocompletePlacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutocompletePlacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutocompletePlacesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AutocompletePlacesRequest { - - /** Properties of a LocationBias. */ - interface ILocationBias { - - /** LocationBias rectangle */ - rectangle?: (google.geo.type.IViewport|null); - - /** LocationBias circle */ - circle?: (google.maps.places.v1.ICircle|null); - } - - /** Represents a LocationBias. */ - class LocationBias implements ILocationBias { - - /** - * Constructs a new LocationBias. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias); - - /** LocationBias rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); - - /** LocationBias circle. */ - public circle?: (google.maps.places.v1.ICircle|null); - - /** LocationBias type. */ - public type?: ("rectangle"|"circle"); - - /** - * Creates a new LocationBias instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationBias instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - - /** - * Verifies a LocationBias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationBias - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @param message LocationBias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationBias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationBias - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { - - /** LocationRestriction rectangle */ - rectangle?: (google.geo.type.IViewport|null); - - /** LocationRestriction circle */ - circle?: (google.maps.places.v1.ICircle|null); - } - - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { - - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction); - - /** LocationRestriction rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); - - /** LocationRestriction circle. */ - public circle?: (google.maps.places.v1.ICircle|null); - - /** LocationRestriction type. */ - public type?: ("rectangle"|"circle"); - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an AutocompletePlacesResponse. */ - interface IAutocompletePlacesResponse { - - /** AutocompletePlacesResponse suggestions */ - suggestions?: (google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]|null); - } - - /** Represents an AutocompletePlacesResponse. */ - class AutocompletePlacesResponse implements IAutocompletePlacesResponse { - - /** - * Constructs a new AutocompletePlacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IAutocompletePlacesResponse); - - /** AutocompletePlacesResponse suggestions. */ - public suggestions: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]; - - /** - * Creates a new AutocompletePlacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AutocompletePlacesResponse instance - */ - public static create(properties?: google.maps.places.v1.IAutocompletePlacesResponse): google.maps.places.v1.AutocompletePlacesResponse; - - /** - * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @param message AutocompletePlacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @param message AutocompletePlacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse; - - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse; - - /** - * Verifies an AutocompletePlacesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutocompletePlacesResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse; - - /** - * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. - * @param message AutocompletePlacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AutocompletePlacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AutocompletePlacesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AutocompletePlacesResponse { - - /** Properties of a Suggestion. */ - interface ISuggestion { - - /** Suggestion placePrediction */ - placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); - - /** Suggestion queryPrediction */ - queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); - } - - /** Represents a Suggestion. */ - class Suggestion implements ISuggestion { - - /** - * Constructs a new Suggestion. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion); - - /** Suggestion placePrediction. */ - public placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); - - /** Suggestion queryPrediction. */ - public queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); - - /** Suggestion kind. */ - public kind?: ("placePrediction"|"queryPrediction"); - - /** - * Creates a new Suggestion instance using the specified properties. - * @param [properties] Properties to set - * @returns Suggestion instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; - - /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Suggestion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; - - /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; - - /** - * Verifies a Suggestion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Suggestion - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; - - /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @param message Suggestion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Suggestion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Suggestion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Suggestion { - - /** Properties of a StringRange. */ - interface IStringRange { - - /** StringRange startOffset */ - startOffset?: (number|null); - - /** StringRange endOffset */ - endOffset?: (number|null); - } - - /** Represents a StringRange. */ - class StringRange implements IStringRange { - - /** - * Constructs a new StringRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange); - - /** StringRange startOffset. */ - public startOffset: number; - - /** StringRange endOffset. */ - public endOffset: number; - - /** - * Creates a new StringRange instance using the specified properties. - * @param [properties] Properties to set - * @returns StringRange instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; - - /** - * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @param message StringRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @param message StringRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; - - /** - * Decodes a StringRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; - - /** - * Verifies a StringRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringRange - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; - - /** - * Creates a plain object from a StringRange message. Also converts values to other types if specified. - * @param message StringRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FormattableText. */ - interface IFormattableText { - - /** FormattableText text */ - text?: (string|null); - - /** FormattableText matches */ - matches?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]|null); - } - - /** Represents a FormattableText. */ - class FormattableText implements IFormattableText { - - /** - * Constructs a new FormattableText. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText); - - /** FormattableText text. */ - public text: string; - - /** FormattableText matches. */ - public matches: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]; - - /** - * Creates a new FormattableText instance using the specified properties. - * @param [properties] Properties to set - * @returns FormattableText instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - - /** - * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @param message FormattableText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @param message FormattableText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FormattableText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - - /** - * Decodes a FormattableText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - - /** - * Verifies a FormattableText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FormattableText - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - - /** - * Creates a plain object from a FormattableText message. Also converts values to other types if specified. - * @param message FormattableText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FormattableText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FormattableText - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StructuredFormat. */ - interface IStructuredFormat { - - /** StructuredFormat mainText */ - mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** StructuredFormat secondaryText */ - secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - } - - /** Represents a StructuredFormat. */ - class StructuredFormat implements IStructuredFormat { - - /** - * Constructs a new StructuredFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat); - - /** StructuredFormat mainText. */ - public mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** StructuredFormat secondaryText. */ - public secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** - * Creates a new StructuredFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns StructuredFormat instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - - /** - * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @param message StructuredFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @param message StructuredFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StructuredFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - - /** - * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - - /** - * Verifies a StructuredFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StructuredFormat - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - - /** - * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. - * @param message StructuredFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StructuredFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StructuredFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PlacePrediction. */ - interface IPlacePrediction { - - /** PlacePrediction place */ - place?: (string|null); - - /** PlacePrediction placeId */ - placeId?: (string|null); - - /** PlacePrediction text */ - text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** PlacePrediction structuredFormat */ - structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - - /** PlacePrediction types */ - types?: (string[]|null); - - /** PlacePrediction distanceMeters */ - distanceMeters?: (number|null); - } - - /** Represents a PlacePrediction. */ - class PlacePrediction implements IPlacePrediction { - - /** - * Constructs a new PlacePrediction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction); - - /** PlacePrediction place. */ - public place: string; - - /** PlacePrediction placeId. */ - public placeId: string; - - /** PlacePrediction text. */ - public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** PlacePrediction structuredFormat. */ - public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - - /** PlacePrediction types. */ - public types: string[]; - - /** PlacePrediction distanceMeters. */ - public distanceMeters: number; - - /** - * Creates a new PlacePrediction instance using the specified properties. - * @param [properties] Properties to set - * @returns PlacePrediction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - - /** - * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @param message PlacePrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @param message PlacePrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlacePrediction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - - /** - * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - - /** - * Verifies a PlacePrediction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlacePrediction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - - /** - * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. - * @param message PlacePrediction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlacePrediction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlacePrediction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QueryPrediction. */ - interface IQueryPrediction { - - /** QueryPrediction text */ - text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** QueryPrediction structuredFormat */ - structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - } - - /** Represents a QueryPrediction. */ - class QueryPrediction implements IQueryPrediction { - - /** - * Constructs a new QueryPrediction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction); - - /** QueryPrediction text. */ - public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - - /** QueryPrediction structuredFormat. */ - public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - - /** - * Creates a new QueryPrediction instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryPrediction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; - - /** - * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @param message QueryPrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @param message QueryPrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPrediction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; - - /** - * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; - - /** - * Verifies a QueryPrediction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPrediction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; - - /** - * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. - * @param message QueryPrediction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPrediction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryPrediction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.js b/owl-bot-staging/google-maps-places/v1/protos/protos.js deleted file mode 100644 index 28e7a11cbfb..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/protos.js +++ /dev/null @@ -1,36611 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._googlemaps_places_protos || ($protobuf.roots._googlemaps_places_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.geo = (function() { - - /** - * Namespace geo. - * @memberof google - * @namespace - */ - var geo = {}; - - geo.type = (function() { - - /** - * Namespace type. - * @memberof google.geo - * @namespace - */ - var type = {}; - - type.Viewport = (function() { - - /** - * Properties of a Viewport. - * @memberof google.geo.type - * @interface IViewport - * @property {google.type.ILatLng|null} [low] Viewport low - * @property {google.type.ILatLng|null} [high] Viewport high - */ - - /** - * Constructs a new Viewport. - * @memberof google.geo.type - * @classdesc Represents a Viewport. - * @implements IViewport - * @constructor - * @param {google.geo.type.IViewport=} [properties] Properties to set - */ - function Viewport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Viewport low. - * @member {google.type.ILatLng|null|undefined} low - * @memberof google.geo.type.Viewport - * @instance - */ - Viewport.prototype.low = null; - - /** - * Viewport high. - * @member {google.type.ILatLng|null|undefined} high - * @memberof google.geo.type.Viewport - * @instance - */ - Viewport.prototype.high = null; - - /** - * Creates a new Viewport instance using the specified properties. - * @function create - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport=} [properties] Properties to set - * @returns {google.geo.type.Viewport} Viewport instance - */ - Viewport.create = function create(properties) { - return new Viewport(properties); - }; - - /** - * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @function encode - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport} message Viewport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Viewport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.low != null && Object.hasOwnProperty.call(message, "low")) - $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.high != null && Object.hasOwnProperty.call(message, "high")) - $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport} message Viewport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Viewport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Viewport message from the specified reader or buffer. - * @function decode - * @memberof google.geo.type.Viewport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.geo.type.Viewport} Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Viewport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.low = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 2: { - message.high = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Viewport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.geo.type.Viewport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.geo.type.Viewport} Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Viewport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Viewport message. - * @function verify - * @memberof google.geo.type.Viewport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Viewport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.low != null && message.hasOwnProperty("low")) { - var error = $root.google.type.LatLng.verify(message.low); - if (error) - return "low." + error; - } - if (message.high != null && message.hasOwnProperty("high")) { - var error = $root.google.type.LatLng.verify(message.high); - if (error) - return "high." + error; - } - return null; - }; - - /** - * Creates a Viewport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.geo.type.Viewport - * @static - * @param {Object.} object Plain object - * @returns {google.geo.type.Viewport} Viewport - */ - Viewport.fromObject = function fromObject(object) { - if (object instanceof $root.google.geo.type.Viewport) - return object; - var message = new $root.google.geo.type.Viewport(); - if (object.low != null) { - if (typeof object.low !== "object") - throw TypeError(".google.geo.type.Viewport.low: object expected"); - message.low = $root.google.type.LatLng.fromObject(object.low); - } - if (object.high != null) { - if (typeof object.high !== "object") - throw TypeError(".google.geo.type.Viewport.high: object expected"); - message.high = $root.google.type.LatLng.fromObject(object.high); - } - return message; - }; - - /** - * Creates a plain object from a Viewport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.Viewport} message Viewport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Viewport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.low = null; - object.high = null; - } - if (message.low != null && message.hasOwnProperty("low")) - object.low = $root.google.type.LatLng.toObject(message.low, options); - if (message.high != null && message.hasOwnProperty("high")) - object.high = $root.google.type.LatLng.toObject(message.high, options); - return object; - }; - - /** - * Converts this Viewport to JSON. - * @function toJSON - * @memberof google.geo.type.Viewport - * @instance - * @returns {Object.} JSON object - */ - Viewport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Viewport - * @function getTypeUrl - * @memberof google.geo.type.Viewport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.geo.type.Viewport"; - }; - - return Viewport; - })(); - - return type; - })(); - - return geo; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.LatLng = (function() { - - /** - * Properties of a LatLng. - * @memberof google.type - * @interface ILatLng - * @property {number|null} [latitude] LatLng latitude - * @property {number|null} [longitude] LatLng longitude - */ - - /** - * Constructs a new LatLng. - * @memberof google.type - * @classdesc Represents a LatLng. - * @implements ILatLng - * @constructor - * @param {google.type.ILatLng=} [properties] Properties to set - */ - function LatLng(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatLng latitude. - * @member {number} latitude - * @memberof google.type.LatLng - * @instance - */ - LatLng.prototype.latitude = 0; - - /** - * LatLng longitude. - * @member {number} longitude - * @memberof google.type.LatLng - * @instance - */ - LatLng.prototype.longitude = 0; - - /** - * Creates a new LatLng instance using the specified properties. - * @function create - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng=} [properties] Properties to set - * @returns {google.type.LatLng} LatLng instance - */ - LatLng.create = function create(properties) { - return new LatLng(properties); - }; - - /** - * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @function encode - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng} message LatLng message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatLng.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude); - return writer; - }; - - /** - * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng} message LatLng message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatLng.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatLng message from the specified reader or buffer. - * @function decode - * @memberof google.type.LatLng - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.LatLng} LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatLng.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.latitude = reader.double(); - break; - } - case 2: { - message.longitude = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatLng message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.LatLng - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.LatLng} LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatLng.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatLng message. - * @function verify - * @memberof google.type.LatLng - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatLng.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) - if (typeof message.latitude !== "number") - return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) - if (typeof message.longitude !== "number") - return "longitude: number expected"; - return null; - }; - - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.LatLng - * @static - * @param {Object.} object Plain object - * @returns {google.type.LatLng} LatLng - */ - LatLng.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LatLng) - return object; - var message = new $root.google.type.LatLng(); - if (object.latitude != null) - message.latitude = Number(object.latitude); - if (object.longitude != null) - message.longitude = Number(object.longitude); - return message; - }; - - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.LatLng - * @static - * @param {google.type.LatLng} message LatLng - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatLng.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.latitude = 0; - object.longitude = 0; - } - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - return object; - }; - - /** - * Converts this LatLng to JSON. - * @function toJSON - * @memberof google.type.LatLng - * @instance - * @returns {Object.} JSON object - */ - LatLng.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatLng - * @function getTypeUrl - * @memberof google.type.LatLng - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.LatLng"; - }; - - return LatLng; - })(); - - type.LocalizedText = (function() { - - /** - * Properties of a LocalizedText. - * @memberof google.type - * @interface ILocalizedText - * @property {string|null} [text] LocalizedText text - * @property {string|null} [languageCode] LocalizedText languageCode - */ - - /** - * Constructs a new LocalizedText. - * @memberof google.type - * @classdesc Represents a LocalizedText. - * @implements ILocalizedText - * @constructor - * @param {google.type.ILocalizedText=} [properties] Properties to set - */ - function LocalizedText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocalizedText text. - * @member {string} text - * @memberof google.type.LocalizedText - * @instance - */ - LocalizedText.prototype.text = ""; - - /** - * LocalizedText languageCode. - * @member {string} languageCode - * @memberof google.type.LocalizedText - * @instance - */ - LocalizedText.prototype.languageCode = ""; - - /** - * Creates a new LocalizedText instance using the specified properties. - * @function create - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText=} [properties] Properties to set - * @returns {google.type.LocalizedText} LocalizedText instance - */ - LocalizedText.create = function create(properties) { - return new LocalizedText(properties); - }; - - /** - * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @function encode - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - return writer; - }; - - /** - * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocalizedText message from the specified reader or buffer. - * @function decode - * @memberof google.type.LocalizedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.LocalizedText} LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LocalizedText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocalizedText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.LocalizedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.LocalizedText} LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocalizedText message. - * @function verify - * @memberof google.type.LocalizedText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalizedText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.LocalizedText - * @static - * @param {Object.} object Plain object - * @returns {google.type.LocalizedText} LocalizedText - */ - LocalizedText.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LocalizedText) - return object; - var message = new $root.google.type.LocalizedText(); - if (object.text != null) - message.text = String(object.text); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.LocalizedText - * @static - * @param {google.type.LocalizedText} message LocalizedText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalizedText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.languageCode = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - - /** - * Converts this LocalizedText to JSON. - * @function toJSON - * @memberof google.type.LocalizedText - * @instance - * @returns {Object.} JSON object - */ - LocalizedText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocalizedText - * @function getTypeUrl - * @memberof google.type.LocalizedText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocalizedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.LocalizedText"; - }; - - return LocalizedText; - })(); - - type.Money = (function() { - - /** - * Properties of a Money. - * @memberof google.type - * @interface IMoney - * @property {string|null} [currencyCode] Money currencyCode - * @property {number|Long|null} [units] Money units - * @property {number|null} [nanos] Money nanos - */ - - /** - * Constructs a new Money. - * @memberof google.type - * @classdesc Represents a Money. - * @implements IMoney - * @constructor - * @param {google.type.IMoney=} [properties] Properties to set - */ - function Money(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Money currencyCode. - * @member {string} currencyCode - * @memberof google.type.Money - * @instance - */ - Money.prototype.currencyCode = ""; - - /** - * Money units. - * @member {number|Long} units - * @memberof google.type.Money - * @instance - */ - Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Money nanos. - * @member {number} nanos - * @memberof google.type.Money - * @instance - */ - Money.prototype.nanos = 0; - - /** - * Creates a new Money instance using the specified properties. - * @function create - * @memberof google.type.Money - * @static - * @param {google.type.IMoney=} [properties] Properties to set - * @returns {google.type.Money} Money instance - */ - Money.create = function create(properties) { - return new Money(properties); - }; - - /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @function encode - * @memberof google.type.Money - * @static - * @param {google.type.IMoney} message Money message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Money.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); - if (message.units != null && Object.hasOwnProperty.call(message, "units")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Money - * @static - * @param {google.type.IMoney} message Money message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Money.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Money message from the specified reader or buffer. - * @function decode - * @memberof google.type.Money - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Money} Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Money.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.currencyCode = reader.string(); - break; - } - case 2: { - message.units = reader.int64(); - break; - } - case 3: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Money message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Money - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Money} Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Money.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Money message. - * @function verify - * @memberof google.type.Money - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Money.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.units != null && message.hasOwnProperty("units")) - if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) - return "units: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Money message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Money - * @static - * @param {Object.} object Plain object - * @returns {google.type.Money} Money - */ - Money.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Money) - return object; - var message = new $root.google.type.Money(); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.units != null) - if ($util.Long) - (message.units = $util.Long.fromValue(object.units)).unsigned = false; - else if (typeof object.units === "string") - message.units = parseInt(object.units, 10); - else if (typeof object.units === "number") - message.units = object.units; - else if (typeof object.units === "object") - message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Money message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Money - * @static - * @param {google.type.Money} message Money - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Money.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currencyCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.units = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.units != null && message.hasOwnProperty("units")) - if (typeof message.units === "number") - object.units = options.longs === String ? String(message.units) : message.units; - else - object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Money to JSON. - * @function toJSON - * @memberof google.type.Money - * @instance - * @returns {Object.} JSON object - */ - Money.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Money - * @function getTypeUrl - * @memberof google.type.Money - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Money"; - }; - - return Money; - })(); - - type.Date = (function() { - - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ - - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; - - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; - - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); - - google.maps = (function() { - - /** - * Namespace maps. - * @memberof google - * @namespace - */ - var maps = {}; - - maps.places = (function() { - - /** - * Namespace places. - * @memberof google.maps - * @namespace - */ - var places = {}; - - places.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.maps.places - * @namespace - */ - var v1 = {}; - - v1.AuthorAttribution = (function() { - - /** - * Properties of an AuthorAttribution. - * @memberof google.maps.places.v1 - * @interface IAuthorAttribution - * @property {string|null} [displayName] AuthorAttribution displayName - * @property {string|null} [uri] AuthorAttribution uri - * @property {string|null} [photoUri] AuthorAttribution photoUri - */ - - /** - * Constructs a new AuthorAttribution. - * @memberof google.maps.places.v1 - * @classdesc Represents an AuthorAttribution. - * @implements IAuthorAttribution - * @constructor - * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set - */ - function AuthorAttribution(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuthorAttribution displayName. - * @member {string} displayName - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.displayName = ""; - - /** - * AuthorAttribution uri. - * @member {string} uri - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.uri = ""; - - /** - * AuthorAttribution photoUri. - * @member {string} photoUri - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.photoUri = ""; - - /** - * Creates a new AuthorAttribution instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution instance - */ - AuthorAttribution.create = function create(properties) { - return new AuthorAttribution(properties); - }; - - /** - * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthorAttribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.photoUri); - return writer; - }; - - /** - * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthorAttribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuthorAttribution message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthorAttribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AuthorAttribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.photoUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthorAttribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuthorAttribution message. - * @function verify - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuthorAttribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - if (!$util.isString(message.photoUri)) - return "photoUri: string expected"; - return null; - }; - - /** - * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - */ - AuthorAttribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AuthorAttribution) - return object; - var message = new $root.google.maps.places.v1.AuthorAttribution(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.photoUri != null) - message.photoUri = String(object.photoUri); - return message; - }; - - /** - * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.AuthorAttribution} message AuthorAttribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuthorAttribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.photoUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - object.photoUri = message.photoUri; - return object; - }; - - /** - * Converts this AuthorAttribution to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - * @returns {Object.} JSON object - */ - AuthorAttribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuthorAttribution - * @function getTypeUrl - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuthorAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AuthorAttribution"; - }; - - return AuthorAttribution; - })(); - - v1.ContentBlock = (function() { - - /** - * Properties of a ContentBlock. - * @memberof google.maps.places.v1 - * @interface IContentBlock - * @property {string|null} [topic] ContentBlock topic - * @property {google.type.ILocalizedText|null} [content] ContentBlock content - * @property {google.maps.places.v1.IReferences|null} [references] ContentBlock references - */ - - /** - * Constructs a new ContentBlock. - * @memberof google.maps.places.v1 - * @classdesc Represents a ContentBlock. - * @implements IContentBlock - * @constructor - * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set - */ - function ContentBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContentBlock topic. - * @member {string} topic - * @memberof google.maps.places.v1.ContentBlock - * @instance - */ - ContentBlock.prototype.topic = ""; - - /** - * ContentBlock content. - * @member {google.type.ILocalizedText|null|undefined} content - * @memberof google.maps.places.v1.ContentBlock - * @instance - */ - ContentBlock.prototype.content = null; - - /** - * ContentBlock references. - * @member {google.maps.places.v1.IReferences|null|undefined} references - * @memberof google.maps.places.v1.ContentBlock - * @instance - */ - ContentBlock.prototype.references = null; - - /** - * Creates a new ContentBlock instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set - * @returns {google.maps.places.v1.ContentBlock} ContentBlock instance - */ - ContentBlock.create = function create(properties) { - return new ContentBlock(properties); - }; - - /** - * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContentBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.type.LocalizedText.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.references != null && Object.hasOwnProperty.call(message, "references")) - $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContentBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContentBlock message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContentBlock} ContentBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContentBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContentBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - case 2: { - message.content = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 3: { - message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContentBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContentBlock} ContentBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContentBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContentBlock message. - * @function verify - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContentBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.type.LocalizedText.verify(message.content); - if (error) - return "content." + error; - } - if (message.references != null && message.hasOwnProperty("references")) { - var error = $root.google.maps.places.v1.References.verify(message.references); - if (error) - return "references." + error; - } - return null; - }; - - /** - * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContentBlock} ContentBlock - */ - ContentBlock.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContentBlock) - return object; - var message = new $root.google.maps.places.v1.ContentBlock(); - if (object.topic != null) - message.topic = String(object.topic); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".google.maps.places.v1.ContentBlock.content: object expected"); - message.content = $root.google.type.LocalizedText.fromObject(object.content); - } - if (object.references != null) { - if (typeof object.references !== "object") - throw TypeError(".google.maps.places.v1.ContentBlock.references: object expected"); - message.references = $root.google.maps.places.v1.References.fromObject(object.references); - } - return message; - }; - - /** - * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {google.maps.places.v1.ContentBlock} message ContentBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContentBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.topic = ""; - object.content = null; - object.references = null; - } - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.type.LocalizedText.toObject(message.content, options); - if (message.references != null && message.hasOwnProperty("references")) - object.references = $root.google.maps.places.v1.References.toObject(message.references, options); - return object; - }; - - /** - * Converts this ContentBlock to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContentBlock - * @instance - * @returns {Object.} JSON object - */ - ContentBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContentBlock - * @function getTypeUrl - * @memberof google.maps.places.v1.ContentBlock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContentBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContentBlock"; - }; - - return ContentBlock; - })(); - - v1.References = (function() { - - /** - * Properties of a References. - * @memberof google.maps.places.v1 - * @interface IReferences - * @property {Array.|null} [reviews] References reviews - * @property {Array.|null} [places] References places - */ - - /** - * Constructs a new References. - * @memberof google.maps.places.v1 - * @classdesc Represents a References. - * @implements IReferences - * @constructor - * @param {google.maps.places.v1.IReferences=} [properties] Properties to set - */ - function References(properties) { - this.reviews = []; - this.places = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * References reviews. - * @member {Array.} reviews - * @memberof google.maps.places.v1.References - * @instance - */ - References.prototype.reviews = $util.emptyArray; - - /** - * References places. - * @member {Array.} places - * @memberof google.maps.places.v1.References - * @instance - */ - References.prototype.places = $util.emptyArray; - - /** - * Creates a new References instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.References - * @static - * @param {google.maps.places.v1.IReferences=} [properties] Properties to set - * @returns {google.maps.places.v1.References} References instance - */ - References.create = function create(properties) { - return new References(properties); - }; - - /** - * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.References - * @static - * @param {google.maps.places.v1.IReferences} message References message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - References.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reviews != null && message.reviews.length) - for (var i = 0; i < message.reviews.length; ++i) - $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.places != null && message.places.length) - for (var i = 0; i < message.places.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.places[i]); - return writer; - }; - - /** - * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.References - * @static - * @param {google.maps.places.v1.IReferences} message References message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - References.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a References message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.References - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.References} References - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - References.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.References(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.reviews && message.reviews.length)) - message.reviews = []; - message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.places && message.places.length)) - message.places = []; - message.places.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a References message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.References - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.References} References - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - References.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a References message. - * @function verify - * @memberof google.maps.places.v1.References - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - References.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reviews != null && message.hasOwnProperty("reviews")) { - if (!Array.isArray(message.reviews)) - return "reviews: array expected"; - for (var i = 0; i < message.reviews.length; ++i) { - var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); - if (error) - return "reviews." + error; - } - } - if (message.places != null && message.hasOwnProperty("places")) { - if (!Array.isArray(message.places)) - return "places: array expected"; - for (var i = 0; i < message.places.length; ++i) - if (!$util.isString(message.places[i])) - return "places: string[] expected"; - } - return null; - }; - - /** - * Creates a References message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.References - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.References} References - */ - References.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.References) - return object; - var message = new $root.google.maps.places.v1.References(); - if (object.reviews) { - if (!Array.isArray(object.reviews)) - throw TypeError(".google.maps.places.v1.References.reviews: array expected"); - message.reviews = []; - for (var i = 0; i < object.reviews.length; ++i) { - if (typeof object.reviews[i] !== "object") - throw TypeError(".google.maps.places.v1.References.reviews: object expected"); - message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); - } - } - if (object.places) { - if (!Array.isArray(object.places)) - throw TypeError(".google.maps.places.v1.References.places: array expected"); - message.places = []; - for (var i = 0; i < object.places.length; ++i) - message.places[i] = String(object.places[i]); - } - return message; - }; - - /** - * Creates a plain object from a References message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.References - * @static - * @param {google.maps.places.v1.References} message References - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - References.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.reviews = []; - object.places = []; - } - if (message.reviews && message.reviews.length) { - object.reviews = []; - for (var j = 0; j < message.reviews.length; ++j) - object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); - } - if (message.places && message.places.length) { - object.places = []; - for (var j = 0; j < message.places.length; ++j) - object.places[j] = message.places[j]; - } - return object; - }; - - /** - * Converts this References to JSON. - * @function toJSON - * @memberof google.maps.places.v1.References - * @instance - * @returns {Object.} JSON object - */ - References.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for References - * @function getTypeUrl - * @memberof google.maps.places.v1.References - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - References.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.References"; - }; - - return References; - })(); - - v1.Review = (function() { - - /** - * Properties of a Review. - * @memberof google.maps.places.v1 - * @interface IReview - * @property {string|null} [name] Review name - * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription - * @property {google.type.ILocalizedText|null} [text] Review text - * @property {google.type.ILocalizedText|null} [originalText] Review originalText - * @property {number|null} [rating] Review rating - * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution - * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime - */ - - /** - * Constructs a new Review. - * @memberof google.maps.places.v1 - * @classdesc Represents a Review. - * @implements IReview - * @constructor - * @param {google.maps.places.v1.IReview=} [properties] Properties to set - */ - function Review(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Review name. - * @member {string} name - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.name = ""; - - /** - * Review relativePublishTimeDescription. - * @member {string} relativePublishTimeDescription - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.relativePublishTimeDescription = ""; - - /** - * Review text. - * @member {google.type.ILocalizedText|null|undefined} text - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.text = null; - - /** - * Review originalText. - * @member {google.type.ILocalizedText|null|undefined} originalText - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.originalText = null; - - /** - * Review rating. - * @member {number} rating - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.rating = 0; - - /** - * Review authorAttribution. - * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.authorAttribution = null; - - /** - * Review publishTime. - * @member {google.protobuf.ITimestamp|null|undefined} publishTime - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.publishTime = null; - - /** - * Creates a new Review instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview=} [properties] Properties to set - * @returns {google.maps.places.v1.Review} Review instance - */ - Review.create = function create(properties) { - return new Review(properties); - }; - - /** - * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview} message Review message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Review.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription); - if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) - writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText")) - $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution")) - $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) - $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview} message Review message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Review.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Review message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Review - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Review} Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Review.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.relativePublishTimeDescription = reader.string(); - break; - } - case 9: { - message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 12: { - message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 7: { - message.rating = reader.double(); - break; - } - case 13: { - message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()); - break; - } - case 14: { - message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Review message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Review - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Review} Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Review.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Review message. - * @function verify - * @memberof google.maps.places.v1.Review - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Review.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) - if (!$util.isString(message.relativePublishTimeDescription)) - return "relativePublishTimeDescription: string expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.type.LocalizedText.verify(message.text); - if (error) - return "text." + error; - } - if (message.originalText != null && message.hasOwnProperty("originalText")) { - var error = $root.google.type.LocalizedText.verify(message.originalText); - if (error) - return "originalText." + error; - } - if (message.rating != null && message.hasOwnProperty("rating")) - if (typeof message.rating !== "number") - return "rating: number expected"; - if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) { - var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution); - if (error) - return "authorAttribution." + error; - } - if (message.publishTime != null && message.hasOwnProperty("publishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.publishTime); - if (error) - return "publishTime." + error; - } - return null; - }; - - /** - * Creates a Review message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Review - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Review} Review - */ - Review.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Review) - return object; - var message = new $root.google.maps.places.v1.Review(); - if (object.name != null) - message.name = String(object.name); - if (object.relativePublishTimeDescription != null) - message.relativePublishTimeDescription = String(object.relativePublishTimeDescription); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.Review.text: object expected"); - message.text = $root.google.type.LocalizedText.fromObject(object.text); - } - if (object.originalText != null) { - if (typeof object.originalText !== "object") - throw TypeError(".google.maps.places.v1.Review.originalText: object expected"); - message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText); - } - if (object.rating != null) - message.rating = Number(object.rating); - if (object.authorAttribution != null) { - if (typeof object.authorAttribution !== "object") - throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected"); - message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution); - } - if (object.publishTime != null) { - if (typeof object.publishTime !== "object") - throw TypeError(".google.maps.places.v1.Review.publishTime: object expected"); - message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime); - } - return message; - }; - - /** - * Creates a plain object from a Review message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.Review} message Review - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Review.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.relativePublishTimeDescription = ""; - object.rating = 0; - object.text = null; - object.originalText = null; - object.authorAttribution = null; - object.publishTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) - object.relativePublishTimeDescription = message.relativePublishTimeDescription; - if (message.rating != null && message.hasOwnProperty("rating")) - object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.type.LocalizedText.toObject(message.text, options); - if (message.originalText != null && message.hasOwnProperty("originalText")) - object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options); - if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) - object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options); - if (message.publishTime != null && message.hasOwnProperty("publishTime")) - object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options); - return object; - }; - - /** - * Converts this Review to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Review - * @instance - * @returns {Object.} JSON object - */ - Review.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Review - * @function getTypeUrl - * @memberof google.maps.places.v1.Review - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Review"; - }; - - return Review; - })(); - - v1.ContextualContent = (function() { - - /** - * Properties of a ContextualContent. - * @memberof google.maps.places.v1 - * @interface IContextualContent - * @property {Array.|null} [reviews] ContextualContent reviews - * @property {Array.|null} [photos] ContextualContent photos - * @property {Array.|null} [justifications] ContextualContent justifications - */ - - /** - * Constructs a new ContextualContent. - * @memberof google.maps.places.v1 - * @classdesc Represents a ContextualContent. - * @implements IContextualContent - * @constructor - * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set - */ - function ContextualContent(properties) { - this.reviews = []; - this.photos = []; - this.justifications = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContextualContent reviews. - * @member {Array.} reviews - * @memberof google.maps.places.v1.ContextualContent - * @instance - */ - ContextualContent.prototype.reviews = $util.emptyArray; - - /** - * ContextualContent photos. - * @member {Array.} photos - * @memberof google.maps.places.v1.ContextualContent - * @instance - */ - ContextualContent.prototype.photos = $util.emptyArray; - - /** - * ContextualContent justifications. - * @member {Array.} justifications - * @memberof google.maps.places.v1.ContextualContent - * @instance - */ - ContextualContent.prototype.justifications = $util.emptyArray; - - /** - * Creates a new ContextualContent instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent} ContextualContent instance - */ - ContextualContent.create = function create(properties) { - return new ContextualContent(properties); - }; - - /** - * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextualContent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reviews != null && message.reviews.length) - for (var i = 0; i < message.reviews.length; ++i) - $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.photos != null && message.photos.length) - for (var i = 0; i < message.photos.length; ++i) - $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.justifications != null && message.justifications.length) - for (var i = 0; i < message.justifications.length; ++i) - $root.google.maps.places.v1.ContextualContent.Justification.encode(message.justifications[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextualContent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContextualContent message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent} ContextualContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextualContent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.reviews && message.reviews.length)) - message.reviews = []; - message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.photos && message.photos.length)) - message.photos = []; - message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.justifications && message.justifications.length)) - message.justifications = []; - message.justifications.push($root.google.maps.places.v1.ContextualContent.Justification.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContextualContent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent} ContextualContent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextualContent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContextualContent message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContextualContent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reviews != null && message.hasOwnProperty("reviews")) { - if (!Array.isArray(message.reviews)) - return "reviews: array expected"; - for (var i = 0; i < message.reviews.length; ++i) { - var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); - if (error) - return "reviews." + error; - } - } - if (message.photos != null && message.hasOwnProperty("photos")) { - if (!Array.isArray(message.photos)) - return "photos: array expected"; - for (var i = 0; i < message.photos.length; ++i) { - var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); - if (error) - return "photos." + error; - } - } - if (message.justifications != null && message.hasOwnProperty("justifications")) { - if (!Array.isArray(message.justifications)) - return "justifications: array expected"; - for (var i = 0; i < message.justifications.length; ++i) { - var error = $root.google.maps.places.v1.ContextualContent.Justification.verify(message.justifications[i]); - if (error) - return "justifications." + error; - } - } - return null; - }; - - /** - * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent} ContextualContent - */ - ContextualContent.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent) - return object; - var message = new $root.google.maps.places.v1.ContextualContent(); - if (object.reviews) { - if (!Array.isArray(object.reviews)) - throw TypeError(".google.maps.places.v1.ContextualContent.reviews: array expected"); - message.reviews = []; - for (var i = 0; i < object.reviews.length; ++i) { - if (typeof object.reviews[i] !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.reviews: object expected"); - message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); - } - } - if (object.photos) { - if (!Array.isArray(object.photos)) - throw TypeError(".google.maps.places.v1.ContextualContent.photos: array expected"); - message.photos = []; - for (var i = 0; i < object.photos.length; ++i) { - if (typeof object.photos[i] !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.photos: object expected"); - message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); - } - } - if (object.justifications) { - if (!Array.isArray(object.justifications)) - throw TypeError(".google.maps.places.v1.ContextualContent.justifications: array expected"); - message.justifications = []; - for (var i = 0; i < object.justifications.length; ++i) { - if (typeof object.justifications[i] !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.justifications: object expected"); - message.justifications[i] = $root.google.maps.places.v1.ContextualContent.Justification.fromObject(object.justifications[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {google.maps.places.v1.ContextualContent} message ContextualContent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContextualContent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.reviews = []; - object.photos = []; - object.justifications = []; - } - if (message.reviews && message.reviews.length) { - object.reviews = []; - for (var j = 0; j < message.reviews.length; ++j) - object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); - } - if (message.photos && message.photos.length) { - object.photos = []; - for (var j = 0; j < message.photos.length; ++j) - object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); - } - if (message.justifications && message.justifications.length) { - object.justifications = []; - for (var j = 0; j < message.justifications.length; ++j) - object.justifications[j] = $root.google.maps.places.v1.ContextualContent.Justification.toObject(message.justifications[j], options); - } - return object; - }; - - /** - * Converts this ContextualContent to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent - * @instance - * @returns {Object.} JSON object - */ - ContextualContent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContextualContent - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContextualContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent"; - }; - - ContextualContent.Justification = (function() { - - /** - * Properties of a Justification. - * @memberof google.maps.places.v1.ContextualContent - * @interface IJustification - * @property {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null} [reviewJustification] Justification reviewJustification - * @property {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null} [businessAvailabilityAttributesJustification] Justification businessAvailabilityAttributesJustification - */ - - /** - * Constructs a new Justification. - * @memberof google.maps.places.v1.ContextualContent - * @classdesc Represents a Justification. - * @implements IJustification - * @constructor - * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set - */ - function Justification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Justification reviewJustification. - * @member {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null|undefined} reviewJustification - * @memberof google.maps.places.v1.ContextualContent.Justification - * @instance - */ - Justification.prototype.reviewJustification = null; - - /** - * Justification businessAvailabilityAttributesJustification. - * @member {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null|undefined} businessAvailabilityAttributesJustification - * @memberof google.maps.places.v1.ContextualContent.Justification - * @instance - */ - Justification.prototype.businessAvailabilityAttributesJustification = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Justification justification. - * @member {"reviewJustification"|"businessAvailabilityAttributesJustification"|undefined} justification - * @memberof google.maps.places.v1.ContextualContent.Justification - * @instance - */ - Object.defineProperty(Justification.prototype, "justification", { - get: $util.oneOfGetter($oneOfFields = ["reviewJustification", "businessAvailabilityAttributesJustification"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Justification instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent.Justification} Justification instance - */ - Justification.create = function create(properties) { - return new Justification(properties); - }; - - /** - * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Justification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reviewJustification != null && Object.hasOwnProperty.call(message, "reviewJustification")) - $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.encode(message.reviewJustification, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.businessAvailabilityAttributesJustification != null && Object.hasOwnProperty.call(message, "businessAvailabilityAttributesJustification")) - $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.encode(message.businessAvailabilityAttributesJustification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Justification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Justification message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent.Justification} Justification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Justification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.decode(reader, reader.uint32()); - break; - } - case 2: { - message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Justification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent.Justification} Justification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Justification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Justification message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Justification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { - properties.justification = 1; - { - var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify(message.reviewJustification); - if (error) - return "reviewJustification." + error; - } - } - if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { - if (properties.justification === 1) - return "justification: multiple values"; - properties.justification = 1; - { - var error = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify(message.businessAvailabilityAttributesJustification); - if (error) - return "businessAvailabilityAttributesJustification." + error; - } - } - return null; - }; - - /** - * Creates a Justification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent.Justification} Justification - */ - Justification.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification) - return object; - var message = new $root.google.maps.places.v1.ContextualContent.Justification(); - if (object.reviewJustification != null) { - if (typeof object.reviewJustification !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.reviewJustification: object expected"); - message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.fromObject(object.reviewJustification); - } - if (object.businessAvailabilityAttributesJustification != null) { - if (typeof object.businessAvailabilityAttributesJustification !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.businessAvailabilityAttributesJustification: object expected"); - message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.fromObject(object.businessAvailabilityAttributesJustification); - } - return message; - }; - - /** - * Creates a plain object from a Justification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification} message Justification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Justification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { - object.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.toObject(message.reviewJustification, options); - if (options.oneofs) - object.justification = "reviewJustification"; - } - if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { - object.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.toObject(message.businessAvailabilityAttributesJustification, options); - if (options.oneofs) - object.justification = "businessAvailabilityAttributesJustification"; - } - return object; - }; - - /** - * Converts this Justification to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent.Justification - * @instance - * @returns {Object.} JSON object - */ - Justification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Justification - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent.Justification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Justification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification"; - }; - - Justification.ReviewJustification = (function() { - - /** - * Properties of a ReviewJustification. - * @memberof google.maps.places.v1.ContextualContent.Justification - * @interface IReviewJustification - * @property {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null} [highlightedText] ReviewJustification highlightedText - * @property {google.maps.places.v1.IReview|null} [review] ReviewJustification review - */ - - /** - * Constructs a new ReviewJustification. - * @memberof google.maps.places.v1.ContextualContent.Justification - * @classdesc Represents a ReviewJustification. - * @implements IReviewJustification - * @constructor - * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set - */ - function ReviewJustification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReviewJustification highlightedText. - * @member {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null|undefined} highlightedText - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @instance - */ - ReviewJustification.prototype.highlightedText = null; - - /** - * ReviewJustification review. - * @member {google.maps.places.v1.IReview|null|undefined} review - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @instance - */ - ReviewJustification.prototype.review = null; - - /** - * Creates a new ReviewJustification instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification instance - */ - ReviewJustification.create = function create(properties) { - return new ReviewJustification(properties); - }; - - /** - * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReviewJustification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.highlightedText != null && Object.hasOwnProperty.call(message, "highlightedText")) - $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.encode(message.highlightedText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.review != null && Object.hasOwnProperty.call(message, "review")) - $root.google.maps.places.v1.Review.encode(message.review, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReviewJustification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReviewJustification message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReviewJustification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.review = $root.google.maps.places.v1.Review.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReviewJustification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReviewJustification message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReviewJustification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) { - var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify(message.highlightedText); - if (error) - return "highlightedText." + error; - } - if (message.review != null && message.hasOwnProperty("review")) { - var error = $root.google.maps.places.v1.Review.verify(message.review); - if (error) - return "review." + error; - } - return null; - }; - - /** - * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification - */ - ReviewJustification.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification) - return object; - var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); - if (object.highlightedText != null) { - if (typeof object.highlightedText !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.highlightedText: object expected"); - message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.fromObject(object.highlightedText); - } - if (object.review != null) { - if (typeof object.review !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.review: object expected"); - message.review = $root.google.maps.places.v1.Review.fromObject(object.review); - } - return message; - }; - - /** - * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} message ReviewJustification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReviewJustification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.highlightedText = null; - object.review = null; - } - if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) - object.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.toObject(message.highlightedText, options); - if (message.review != null && message.hasOwnProperty("review")) - object.review = $root.google.maps.places.v1.Review.toObject(message.review, options); - return object; - }; - - /** - * Converts this ReviewJustification to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @instance - * @returns {Object.} JSON object - */ - ReviewJustification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReviewJustification - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReviewJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification"; - }; - - ReviewJustification.HighlightedText = (function() { - - /** - * Properties of a HighlightedText. - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @interface IHighlightedText - * @property {string|null} [text] HighlightedText text - * @property {Array.|null} [highlightedTextRanges] HighlightedText highlightedTextRanges - */ - - /** - * Constructs a new HighlightedText. - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification - * @classdesc Represents a HighlightedText. - * @implements IHighlightedText - * @constructor - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set - */ - function HighlightedText(properties) { - this.highlightedTextRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HighlightedText text. - * @member {string} text - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @instance - */ - HighlightedText.prototype.text = ""; - - /** - * HighlightedText highlightedTextRanges. - * @member {Array.} highlightedTextRanges - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @instance - */ - HighlightedText.prototype.highlightedTextRanges = $util.emptyArray; - - /** - * Creates a new HighlightedText instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText instance - */ - HighlightedText.create = function create(properties) { - return new HighlightedText(properties); - }; - - /** - * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlightedText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.highlightedTextRanges != null && message.highlightedTextRanges.length) - for (var i = 0; i < message.highlightedTextRanges.length; ++i) - $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.encode(message.highlightedTextRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlightedText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HighlightedText message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlightedText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - if (!(message.highlightedTextRanges && message.highlightedTextRanges.length)) - message.highlightedTextRanges = []; - message.highlightedTextRanges.push($root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HighlightedText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlightedText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HighlightedText message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HighlightedText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.highlightedTextRanges != null && message.hasOwnProperty("highlightedTextRanges")) { - if (!Array.isArray(message.highlightedTextRanges)) - return "highlightedTextRanges: array expected"; - for (var i = 0; i < message.highlightedTextRanges.length; ++i) { - var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify(message.highlightedTextRanges[i]); - if (error) - return "highlightedTextRanges." + error; - } - } - return null; - }; - - /** - * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText - */ - HighlightedText.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText) - return object; - var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); - if (object.text != null) - message.text = String(object.text); - if (object.highlightedTextRanges) { - if (!Array.isArray(object.highlightedTextRanges)) - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: array expected"); - message.highlightedTextRanges = []; - for (var i = 0; i < object.highlightedTextRanges.length; ++i) { - if (typeof object.highlightedTextRanges[i] !== "object") - throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: object expected"); - message.highlightedTextRanges[i] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.fromObject(object.highlightedTextRanges[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} message HighlightedText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HighlightedText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.highlightedTextRanges = []; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.highlightedTextRanges && message.highlightedTextRanges.length) { - object.highlightedTextRanges = []; - for (var j = 0; j < message.highlightedTextRanges.length; ++j) - object.highlightedTextRanges[j] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.toObject(message.highlightedTextRanges[j], options); - } - return object; - }; - - /** - * Converts this HighlightedText to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @instance - * @returns {Object.} JSON object - */ - HighlightedText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HighlightedText - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HighlightedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText"; - }; - - HighlightedText.HighlightedTextRange = (function() { - - /** - * Properties of a HighlightedTextRange. - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @interface IHighlightedTextRange - * @property {number|null} [startIndex] HighlightedTextRange startIndex - * @property {number|null} [endIndex] HighlightedTextRange endIndex - */ - - /** - * Constructs a new HighlightedTextRange. - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText - * @classdesc Represents a HighlightedTextRange. - * @implements IHighlightedTextRange - * @constructor - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set - */ - function HighlightedTextRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HighlightedTextRange startIndex. - * @member {number} startIndex - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @instance - */ - HighlightedTextRange.prototype.startIndex = 0; - - /** - * HighlightedTextRange endIndex. - * @member {number} endIndex - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @instance - */ - HighlightedTextRange.prototype.endIndex = 0; - - /** - * Creates a new HighlightedTextRange instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange instance - */ - HighlightedTextRange.create = function create(properties) { - return new HighlightedTextRange(properties); - }; - - /** - * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlightedTextRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startIndex != null && Object.hasOwnProperty.call(message, "startIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startIndex); - if (message.endIndex != null && Object.hasOwnProperty.call(message, "endIndex")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endIndex); - return writer; - }; - - /** - * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HighlightedTextRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HighlightedTextRange message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlightedTextRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startIndex = reader.int32(); - break; - } - case 2: { - message.endIndex = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HighlightedTextRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HighlightedTextRange message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HighlightedTextRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startIndex != null && message.hasOwnProperty("startIndex")) - if (!$util.isInteger(message.startIndex)) - return "startIndex: integer expected"; - if (message.endIndex != null && message.hasOwnProperty("endIndex")) - if (!$util.isInteger(message.endIndex)) - return "endIndex: integer expected"; - return null; - }; - - /** - * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange - */ - HighlightedTextRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange) - return object; - var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); - if (object.startIndex != null) - message.startIndex = object.startIndex | 0; - if (object.endIndex != null) - message.endIndex = object.endIndex | 0; - return message; - }; - - /** - * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} message HighlightedTextRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HighlightedTextRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startIndex = 0; - object.endIndex = 0; - } - if (message.startIndex != null && message.hasOwnProperty("startIndex")) - object.startIndex = message.startIndex; - if (message.endIndex != null && message.hasOwnProperty("endIndex")) - object.endIndex = message.endIndex; - return object; - }; - - /** - * Converts this HighlightedTextRange to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @instance - * @returns {Object.} JSON object - */ - HighlightedTextRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HighlightedTextRange - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HighlightedTextRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange"; - }; - - return HighlightedTextRange; - })(); - - return HighlightedText; - })(); - - return ReviewJustification; - })(); - - Justification.BusinessAvailabilityAttributesJustification = (function() { - - /** - * Properties of a BusinessAvailabilityAttributesJustification. - * @memberof google.maps.places.v1.ContextualContent.Justification - * @interface IBusinessAvailabilityAttributesJustification - * @property {boolean|null} [takeout] BusinessAvailabilityAttributesJustification takeout - * @property {boolean|null} [delivery] BusinessAvailabilityAttributesJustification delivery - * @property {boolean|null} [dineIn] BusinessAvailabilityAttributesJustification dineIn - */ - - /** - * Constructs a new BusinessAvailabilityAttributesJustification. - * @memberof google.maps.places.v1.ContextualContent.Justification - * @classdesc Represents a BusinessAvailabilityAttributesJustification. - * @implements IBusinessAvailabilityAttributesJustification - * @constructor - * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set - */ - function BusinessAvailabilityAttributesJustification(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BusinessAvailabilityAttributesJustification takeout. - * @member {boolean} takeout - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @instance - */ - BusinessAvailabilityAttributesJustification.prototype.takeout = false; - - /** - * BusinessAvailabilityAttributesJustification delivery. - * @member {boolean} delivery - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @instance - */ - BusinessAvailabilityAttributesJustification.prototype.delivery = false; - - /** - * BusinessAvailabilityAttributesJustification dineIn. - * @member {boolean} dineIn - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @instance - */ - BusinessAvailabilityAttributesJustification.prototype.dineIn = false; - - /** - * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set - * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification instance - */ - BusinessAvailabilityAttributesJustification.create = function create(properties) { - return new BusinessAvailabilityAttributesJustification(properties); - }; - - /** - * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessAvailabilityAttributesJustification.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.takeout); - if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.delivery); - if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dineIn); - return writer; - }; - - /** - * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BusinessAvailabilityAttributesJustification.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessAvailabilityAttributesJustification.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.takeout = reader.bool(); - break; - } - case 2: { - message.delivery = reader.bool(); - break; - } - case 3: { - message.dineIn = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BusinessAvailabilityAttributesJustification.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BusinessAvailabilityAttributesJustification message. - * @function verify - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BusinessAvailabilityAttributesJustification.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.takeout != null && message.hasOwnProperty("takeout")) - if (typeof message.takeout !== "boolean") - return "takeout: boolean expected"; - if (message.delivery != null && message.hasOwnProperty("delivery")) - if (typeof message.delivery !== "boolean") - return "delivery: boolean expected"; - if (message.dineIn != null && message.hasOwnProperty("dineIn")) - if (typeof message.dineIn !== "boolean") - return "dineIn: boolean expected"; - return null; - }; - - /** - * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification - */ - BusinessAvailabilityAttributesJustification.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification) - return object; - var message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); - if (object.takeout != null) - message.takeout = Boolean(object.takeout); - if (object.delivery != null) - message.delivery = Boolean(object.delivery); - if (object.dineIn != null) - message.dineIn = Boolean(object.dineIn); - return message; - }; - - /** - * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BusinessAvailabilityAttributesJustification.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.takeout = false; - object.delivery = false; - object.dineIn = false; - } - if (message.takeout != null && message.hasOwnProperty("takeout")) - object.takeout = message.takeout; - if (message.delivery != null && message.hasOwnProperty("delivery")) - object.delivery = message.delivery; - if (message.dineIn != null && message.hasOwnProperty("dineIn")) - object.dineIn = message.dineIn; - return object; - }; - - /** - * Converts this BusinessAvailabilityAttributesJustification to JSON. - * @function toJSON - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @instance - * @returns {Object.} JSON object - */ - BusinessAvailabilityAttributesJustification.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BusinessAvailabilityAttributesJustification - * @function getTypeUrl - * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BusinessAvailabilityAttributesJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification"; - }; - - return BusinessAvailabilityAttributesJustification; - })(); - - return Justification; - })(); - - return ContextualContent; - })(); - - v1.Photo = (function() { - - /** - * Properties of a Photo. - * @memberof google.maps.places.v1 - * @interface IPhoto - * @property {string|null} [name] Photo name - * @property {number|null} [widthPx] Photo widthPx - * @property {number|null} [heightPx] Photo heightPx - * @property {Array.|null} [authorAttributions] Photo authorAttributions - */ - - /** - * Constructs a new Photo. - * @memberof google.maps.places.v1 - * @classdesc Represents a Photo. - * @implements IPhoto - * @constructor - * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set - */ - function Photo(properties) { - this.authorAttributions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Photo name. - * @member {string} name - * @memberof google.maps.places.v1.Photo - * @instance - */ - Photo.prototype.name = ""; - - /** - * Photo widthPx. - * @member {number} widthPx - * @memberof google.maps.places.v1.Photo - * @instance - */ - Photo.prototype.widthPx = 0; - - /** - * Photo heightPx. - * @member {number} heightPx - * @memberof google.maps.places.v1.Photo - * @instance - */ - Photo.prototype.heightPx = 0; - - /** - * Photo authorAttributions. - * @member {Array.} authorAttributions - * @memberof google.maps.places.v1.Photo - * @instance - */ - Photo.prototype.authorAttributions = $util.emptyArray; - - /** - * Creates a new Photo instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Photo - * @static - * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set - * @returns {google.maps.places.v1.Photo} Photo instance - */ - Photo.create = function create(properties) { - return new Photo(properties); - }; - - /** - * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Photo - * @static - * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Photo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx); - if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx); - if (message.authorAttributions != null && message.authorAttributions.length) - for (var i = 0; i < message.authorAttributions.length; ++i) - $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Photo - * @static - * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Photo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Photo message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Photo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Photo} Photo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Photo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.widthPx = reader.int32(); - break; - } - case 3: { - message.heightPx = reader.int32(); - break; - } - case 4: { - if (!(message.authorAttributions && message.authorAttributions.length)) - message.authorAttributions = []; - message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Photo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Photo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Photo} Photo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Photo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Photo message. - * @function verify - * @memberof google.maps.places.v1.Photo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Photo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.widthPx != null && message.hasOwnProperty("widthPx")) - if (!$util.isInteger(message.widthPx)) - return "widthPx: integer expected"; - if (message.heightPx != null && message.hasOwnProperty("heightPx")) - if (!$util.isInteger(message.heightPx)) - return "heightPx: integer expected"; - if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) { - if (!Array.isArray(message.authorAttributions)) - return "authorAttributions: array expected"; - for (var i = 0; i < message.authorAttributions.length; ++i) { - var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]); - if (error) - return "authorAttributions." + error; - } - } - return null; - }; - - /** - * Creates a Photo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Photo - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Photo} Photo - */ - Photo.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Photo) - return object; - var message = new $root.google.maps.places.v1.Photo(); - if (object.name != null) - message.name = String(object.name); - if (object.widthPx != null) - message.widthPx = object.widthPx | 0; - if (object.heightPx != null) - message.heightPx = object.heightPx | 0; - if (object.authorAttributions) { - if (!Array.isArray(object.authorAttributions)) - throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected"); - message.authorAttributions = []; - for (var i = 0; i < object.authorAttributions.length; ++i) { - if (typeof object.authorAttributions[i] !== "object") - throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected"); - message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Photo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Photo - * @static - * @param {google.maps.places.v1.Photo} message Photo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Photo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.authorAttributions = []; - if (options.defaults) { - object.name = ""; - object.widthPx = 0; - object.heightPx = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.widthPx != null && message.hasOwnProperty("widthPx")) - object.widthPx = message.widthPx; - if (message.heightPx != null && message.hasOwnProperty("heightPx")) - object.heightPx = message.heightPx; - if (message.authorAttributions && message.authorAttributions.length) { - object.authorAttributions = []; - for (var j = 0; j < message.authorAttributions.length; ++j) - object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options); - } - return object; - }; - - /** - * Converts this Photo to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Photo - * @instance - * @returns {Object.} JSON object - */ - Photo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Photo - * @function getTypeUrl - * @memberof google.maps.places.v1.Photo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Photo"; - }; - - return Photo; - })(); - - v1.EVChargeOptions = (function() { - - /** - * Properties of a EVChargeOptions. - * @memberof google.maps.places.v1 - * @interface IEVChargeOptions - * @property {number|null} [connectorCount] EVChargeOptions connectorCount - * @property {Array.|null} [connectorAggregation] EVChargeOptions connectorAggregation - */ - - /** - * Constructs a new EVChargeOptions. - * @memberof google.maps.places.v1 - * @classdesc Represents a EVChargeOptions. - * @implements IEVChargeOptions - * @constructor - * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set - */ - function EVChargeOptions(properties) { - this.connectorAggregation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EVChargeOptions connectorCount. - * @member {number} connectorCount - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - */ - EVChargeOptions.prototype.connectorCount = 0; - - /** - * EVChargeOptions connectorAggregation. - * @member {Array.} connectorAggregation - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - */ - EVChargeOptions.prototype.connectorAggregation = $util.emptyArray; - - /** - * Creates a new EVChargeOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions instance - */ - EVChargeOptions.create = function create(properties) { - return new EVChargeOptions(properties); - }; - - /** - * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVChargeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectorCount != null && Object.hasOwnProperty.call(message, "connectorCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectorCount); - if (message.connectorAggregation != null && message.connectorAggregation.length) - for (var i = 0; i < message.connectorAggregation.length; ++i) - $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.encode(message.connectorAggregation[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVChargeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a EVChargeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVChargeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.connectorCount = reader.int32(); - break; - } - case 2: { - if (!(message.connectorAggregation && message.connectorAggregation.length)) - message.connectorAggregation = []; - message.connectorAggregation.push($root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVChargeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a EVChargeOptions message. - * @function verify - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EVChargeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) - if (!$util.isInteger(message.connectorCount)) - return "connectorCount: integer expected"; - if (message.connectorAggregation != null && message.hasOwnProperty("connectorAggregation")) { - if (!Array.isArray(message.connectorAggregation)) - return "connectorAggregation: array expected"; - for (var i = 0; i < message.connectorAggregation.length; ++i) { - var error = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify(message.connectorAggregation[i]); - if (error) - return "connectorAggregation." + error; - } - } - return null; - }; - - /** - * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - */ - EVChargeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.EVChargeOptions) - return object; - var message = new $root.google.maps.places.v1.EVChargeOptions(); - if (object.connectorCount != null) - message.connectorCount = object.connectorCount | 0; - if (object.connectorAggregation) { - if (!Array.isArray(object.connectorAggregation)) - throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: array expected"); - message.connectorAggregation = []; - for (var i = 0; i < object.connectorAggregation.length; ++i) { - if (typeof object.connectorAggregation[i] !== "object") - throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: object expected"); - message.connectorAggregation[i] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.fromObject(object.connectorAggregation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.EVChargeOptions} message EVChargeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EVChargeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connectorAggregation = []; - if (options.defaults) - object.connectorCount = 0; - if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) - object.connectorCount = message.connectorCount; - if (message.connectorAggregation && message.connectorAggregation.length) { - object.connectorAggregation = []; - for (var j = 0; j < message.connectorAggregation.length; ++j) - object.connectorAggregation[j] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.toObject(message.connectorAggregation[j], options); - } - return object; - }; - - /** - * Converts this EVChargeOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - * @returns {Object.} JSON object - */ - EVChargeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EVChargeOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EVChargeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions"; - }; - - EVChargeOptions.ConnectorAggregation = (function() { - - /** - * Properties of a ConnectorAggregation. - * @memberof google.maps.places.v1.EVChargeOptions - * @interface IConnectorAggregation - * @property {google.maps.places.v1.EVConnectorType|null} [type] ConnectorAggregation type - * @property {number|null} [maxChargeRateKw] ConnectorAggregation maxChargeRateKw - * @property {number|null} [count] ConnectorAggregation count - * @property {number|null} [availableCount] ConnectorAggregation availableCount - * @property {number|null} [outOfServiceCount] ConnectorAggregation outOfServiceCount - * @property {google.protobuf.ITimestamp|null} [availabilityLastUpdateTime] ConnectorAggregation availabilityLastUpdateTime - */ - - /** - * Constructs a new ConnectorAggregation. - * @memberof google.maps.places.v1.EVChargeOptions - * @classdesc Represents a ConnectorAggregation. - * @implements IConnectorAggregation - * @constructor - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set - */ - function ConnectorAggregation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConnectorAggregation type. - * @member {google.maps.places.v1.EVConnectorType} type - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.type = 0; - - /** - * ConnectorAggregation maxChargeRateKw. - * @member {number} maxChargeRateKw - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.maxChargeRateKw = 0; - - /** - * ConnectorAggregation count. - * @member {number} count - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.count = 0; - - /** - * ConnectorAggregation availableCount. - * @member {number|null|undefined} availableCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.availableCount = null; - - /** - * ConnectorAggregation outOfServiceCount. - * @member {number|null|undefined} outOfServiceCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.outOfServiceCount = null; - - /** - * ConnectorAggregation availabilityLastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} availabilityLastUpdateTime - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.availabilityLastUpdateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConnectorAggregation _availableCount. - * @member {"availableCount"|undefined} _availableCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - Object.defineProperty(ConnectorAggregation.prototype, "_availableCount", { - get: $util.oneOfGetter($oneOfFields = ["availableCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ConnectorAggregation _outOfServiceCount. - * @member {"outOfServiceCount"|undefined} _outOfServiceCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - Object.defineProperty(ConnectorAggregation.prototype, "_outOfServiceCount", { - get: $util.oneOfGetter($oneOfFields = ["outOfServiceCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConnectorAggregation instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation instance - */ - ConnectorAggregation.create = function create(properties) { - return new ConnectorAggregation(properties); - }; - - /** - * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectorAggregation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.maxChargeRateKw != null && Object.hasOwnProperty.call(message, "maxChargeRateKw")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.maxChargeRateKw); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.count); - if (message.availableCount != null && Object.hasOwnProperty.call(message, "availableCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.availableCount); - if (message.outOfServiceCount != null && Object.hasOwnProperty.call(message, "outOfServiceCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.outOfServiceCount); - if (message.availabilityLastUpdateTime != null && Object.hasOwnProperty.call(message, "availabilityLastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.availabilityLastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectorAggregation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectorAggregation message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectorAggregation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.maxChargeRateKw = reader.double(); - break; - } - case 3: { - message.count = reader.int32(); - break; - } - case 4: { - message.availableCount = reader.int32(); - break; - } - case 5: { - message.outOfServiceCount = reader.int32(); - break; - } - case 6: { - message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectorAggregation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectorAggregation message. - * @function verify - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectorAggregation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) - if (typeof message.maxChargeRateKw !== "number") - return "maxChargeRateKw: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - if (message.availableCount != null && message.hasOwnProperty("availableCount")) { - properties._availableCount = 1; - if (!$util.isInteger(message.availableCount)) - return "availableCount: integer expected"; - } - if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { - properties._outOfServiceCount = 1; - if (!$util.isInteger(message.outOfServiceCount)) - return "outOfServiceCount: integer expected"; - } - if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.availabilityLastUpdateTime); - if (error) - return "availabilityLastUpdateTime." + error; - } - return null; - }; - - /** - * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation - */ - ConnectorAggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) - return object; - var message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "EV_CONNECTOR_TYPE_OTHER": - case 1: - message.type = 1; - break; - case "EV_CONNECTOR_TYPE_J1772": - case 2: - message.type = 2; - break; - case "EV_CONNECTOR_TYPE_TYPE_2": - case 3: - message.type = 3; - break; - case "EV_CONNECTOR_TYPE_CHADEMO": - case 4: - message.type = 4; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_1": - case 5: - message.type = 5; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_2": - case 6: - message.type = 6; - break; - case "EV_CONNECTOR_TYPE_TESLA": - case 7: - message.type = 7; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": - case 8: - message.type = 8; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": - case 9: - message.type = 9; - break; - } - if (object.maxChargeRateKw != null) - message.maxChargeRateKw = Number(object.maxChargeRateKw); - if (object.count != null) - message.count = object.count | 0; - if (object.availableCount != null) - message.availableCount = object.availableCount | 0; - if (object.outOfServiceCount != null) - message.outOfServiceCount = object.outOfServiceCount | 0; - if (object.availabilityLastUpdateTime != null) { - if (typeof object.availabilityLastUpdateTime !== "object") - throw TypeError(".google.maps.places.v1.EVChargeOptions.ConnectorAggregation.availabilityLastUpdateTime: object expected"); - message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.availabilityLastUpdateTime); - } - return message; - }; - - /** - * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} message ConnectorAggregation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectorAggregation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "EV_CONNECTOR_TYPE_UNSPECIFIED" : 0; - object.maxChargeRateKw = 0; - object.count = 0; - object.availabilityLastUpdateTime = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.type] === undefined ? message.type : $root.google.maps.places.v1.EVConnectorType[message.type] : message.type; - if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) - object.maxChargeRateKw = options.json && !isFinite(message.maxChargeRateKw) ? String(message.maxChargeRateKw) : message.maxChargeRateKw; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - if (message.availableCount != null && message.hasOwnProperty("availableCount")) { - object.availableCount = message.availableCount; - if (options.oneofs) - object._availableCount = "availableCount"; - } - if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { - object.outOfServiceCount = message.outOfServiceCount; - if (options.oneofs) - object._outOfServiceCount = "outOfServiceCount"; - } - if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) - object.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.availabilityLastUpdateTime, options); - return object; - }; - - /** - * Converts this ConnectorAggregation to JSON. - * @function toJSON - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - * @returns {Object.} JSON object - */ - ConnectorAggregation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectorAggregation - * @function getTypeUrl - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectorAggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions.ConnectorAggregation"; - }; - - return ConnectorAggregation; - })(); - - return EVChargeOptions; - })(); - - /** - * EVConnectorType enum. - * @name google.maps.places.v1.EVConnectorType - * @enum {number} - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED=0 EV_CONNECTOR_TYPE_UNSPECIFIED value - * @property {number} EV_CONNECTOR_TYPE_OTHER=1 EV_CONNECTOR_TYPE_OTHER value - * @property {number} EV_CONNECTOR_TYPE_J1772=2 EV_CONNECTOR_TYPE_J1772 value - * @property {number} EV_CONNECTOR_TYPE_TYPE_2=3 EV_CONNECTOR_TYPE_TYPE_2 value - * @property {number} EV_CONNECTOR_TYPE_CHADEMO=4 EV_CONNECTOR_TYPE_CHADEMO value - * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_1=5 EV_CONNECTOR_TYPE_CCS_COMBO_1 value - * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_2=6 EV_CONNECTOR_TYPE_CCS_COMBO_2 value - * @property {number} EV_CONNECTOR_TYPE_TESLA=7 EV_CONNECTOR_TYPE_TESLA value - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T=8 EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T value - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET=9 EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET value - */ - v1.EVConnectorType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EV_CONNECTOR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EV_CONNECTOR_TYPE_OTHER"] = 1; - values[valuesById[2] = "EV_CONNECTOR_TYPE_J1772"] = 2; - values[valuesById[3] = "EV_CONNECTOR_TYPE_TYPE_2"] = 3; - values[valuesById[4] = "EV_CONNECTOR_TYPE_CHADEMO"] = 4; - values[valuesById[5] = "EV_CONNECTOR_TYPE_CCS_COMBO_1"] = 5; - values[valuesById[6] = "EV_CONNECTOR_TYPE_CCS_COMBO_2"] = 6; - values[valuesById[7] = "EV_CONNECTOR_TYPE_TESLA"] = 7; - values[valuesById[8] = "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T"] = 8; - values[valuesById[9] = "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET"] = 9; - return values; - })(); - - v1.FuelOptions = (function() { - - /** - * Properties of a FuelOptions. - * @memberof google.maps.places.v1 - * @interface IFuelOptions - * @property {Array.|null} [fuelPrices] FuelOptions fuelPrices - */ - - /** - * Constructs a new FuelOptions. - * @memberof google.maps.places.v1 - * @classdesc Represents a FuelOptions. - * @implements IFuelOptions - * @constructor - * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set - */ - function FuelOptions(properties) { - this.fuelPrices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FuelOptions fuelPrices. - * @member {Array.} fuelPrices - * @memberof google.maps.places.v1.FuelOptions - * @instance - */ - FuelOptions.prototype.fuelPrices = $util.emptyArray; - - /** - * Creates a new FuelOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.FuelOptions} FuelOptions instance - */ - FuelOptions.create = function create(properties) { - return new FuelOptions(properties); - }; - - /** - * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fuelPrices != null && message.fuelPrices.length) - for (var i = 0; i < message.fuelPrices.length; ++i) - $root.google.maps.places.v1.FuelOptions.FuelPrice.encode(message.fuelPrices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FuelOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fuelPrices && message.fuelPrices.length)) - message.fuelPrices = []; - message.fuelPrices.push($root.google.maps.places.v1.FuelOptions.FuelPrice.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FuelOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FuelOptions message. - * @function verify - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FuelOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fuelPrices != null && message.hasOwnProperty("fuelPrices")) { - if (!Array.isArray(message.fuelPrices)) - return "fuelPrices: array expected"; - for (var i = 0; i < message.fuelPrices.length; ++i) { - var error = $root.google.maps.places.v1.FuelOptions.FuelPrice.verify(message.fuelPrices[i]); - if (error) - return "fuelPrices." + error; - } - } - return null; - }; - - /** - * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - */ - FuelOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.FuelOptions) - return object; - var message = new $root.google.maps.places.v1.FuelOptions(); - if (object.fuelPrices) { - if (!Array.isArray(object.fuelPrices)) - throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: array expected"); - message.fuelPrices = []; - for (var i = 0; i < object.fuelPrices.length; ++i) { - if (typeof object.fuelPrices[i] !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: object expected"); - message.fuelPrices[i] = $root.google.maps.places.v1.FuelOptions.FuelPrice.fromObject(object.fuelPrices[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.FuelOptions} message FuelOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FuelOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fuelPrices = []; - if (message.fuelPrices && message.fuelPrices.length) { - object.fuelPrices = []; - for (var j = 0; j < message.fuelPrices.length; ++j) - object.fuelPrices[j] = $root.google.maps.places.v1.FuelOptions.FuelPrice.toObject(message.fuelPrices[j], options); - } - return object; - }; - - /** - * Converts this FuelOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.FuelOptions - * @instance - * @returns {Object.} JSON object - */ - FuelOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FuelOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FuelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.FuelOptions"; - }; - - FuelOptions.FuelPrice = (function() { - - /** - * Properties of a FuelPrice. - * @memberof google.maps.places.v1.FuelOptions - * @interface IFuelPrice - * @property {google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null} [type] FuelPrice type - * @property {google.type.IMoney|null} [price] FuelPrice price - * @property {google.protobuf.ITimestamp|null} [updateTime] FuelPrice updateTime - */ - - /** - * Constructs a new FuelPrice. - * @memberof google.maps.places.v1.FuelOptions - * @classdesc Represents a FuelPrice. - * @implements IFuelPrice - * @constructor - * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set - */ - function FuelPrice(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FuelPrice type. - * @member {google.maps.places.v1.FuelOptions.FuelPrice.FuelType} type - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @instance - */ - FuelPrice.prototype.type = 0; - - /** - * FuelPrice price. - * @member {google.type.IMoney|null|undefined} price - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @instance - */ - FuelPrice.prototype.price = null; - - /** - * FuelPrice updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @instance - */ - FuelPrice.prototype.updateTime = null; - - /** - * Creates a new FuelPrice instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice instance - */ - FuelPrice.create = function create(properties) { - return new FuelPrice(properties); - }; - - /** - * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelPrice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - $root.google.type.Money.encode(message.price, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelPrice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FuelPrice message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelPrice.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.price = $root.google.type.Money.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FuelPrice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelPrice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FuelPrice message. - * @function verify - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FuelPrice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.price != null && message.hasOwnProperty("price")) { - var error = $root.google.type.Money.verify(message.price); - if (error) - return "price." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice - */ - FuelPrice.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.FuelOptions.FuelPrice) - return object; - var message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FUEL_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DIESEL": - case 1: - message.type = 1; - break; - case "REGULAR_UNLEADED": - case 2: - message.type = 2; - break; - case "MIDGRADE": - case 3: - message.type = 3; - break; - case "PREMIUM": - case 4: - message.type = 4; - break; - case "SP91": - case 5: - message.type = 5; - break; - case "SP91_E10": - case 6: - message.type = 6; - break; - case "SP92": - case 7: - message.type = 7; - break; - case "SP95": - case 8: - message.type = 8; - break; - case "SP95_E10": - case 9: - message.type = 9; - break; - case "SP98": - case 10: - message.type = 10; - break; - case "SP99": - case 11: - message.type = 11; - break; - case "SP100": - case 12: - message.type = 12; - break; - case "LPG": - case 13: - message.type = 13; - break; - case "E80": - case 14: - message.type = 14; - break; - case "E85": - case 15: - message.type = 15; - break; - case "METHANE": - case 16: - message.type = 16; - break; - case "BIO_DIESEL": - case 17: - message.type = 17; - break; - case "TRUCK_DIESEL": - case 18: - message.type = 18; - break; - } - if (object.price != null) { - if (typeof object.price !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.price: object expected"); - message.price = $root.google.type.Money.fromObject(object.price); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {google.maps.places.v1.FuelOptions.FuelPrice} message FuelPrice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FuelPrice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "FUEL_TYPE_UNSPECIFIED" : 0; - object.price = null; - object.updateTime = null; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] === undefined ? message.type : $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] : message.type; - if (message.price != null && message.hasOwnProperty("price")) - object.price = $root.google.type.Money.toObject(message.price, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this FuelPrice to JSON. - * @function toJSON - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @instance - * @returns {Object.} JSON object - */ - FuelPrice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FuelPrice - * @function getTypeUrl - * @memberof google.maps.places.v1.FuelOptions.FuelPrice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FuelPrice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.FuelOptions.FuelPrice"; - }; - - /** - * FuelType enum. - * @name google.maps.places.v1.FuelOptions.FuelPrice.FuelType - * @enum {number} - * @property {number} FUEL_TYPE_UNSPECIFIED=0 FUEL_TYPE_UNSPECIFIED value - * @property {number} DIESEL=1 DIESEL value - * @property {number} REGULAR_UNLEADED=2 REGULAR_UNLEADED value - * @property {number} MIDGRADE=3 MIDGRADE value - * @property {number} PREMIUM=4 PREMIUM value - * @property {number} SP91=5 SP91 value - * @property {number} SP91_E10=6 SP91_E10 value - * @property {number} SP92=7 SP92 value - * @property {number} SP95=8 SP95 value - * @property {number} SP95_E10=9 SP95_E10 value - * @property {number} SP98=10 SP98 value - * @property {number} SP99=11 SP99 value - * @property {number} SP100=12 SP100 value - * @property {number} LPG=13 LPG value - * @property {number} E80=14 E80 value - * @property {number} E85=15 E85 value - * @property {number} METHANE=16 METHANE value - * @property {number} BIO_DIESEL=17 BIO_DIESEL value - * @property {number} TRUCK_DIESEL=18 TRUCK_DIESEL value - */ - FuelPrice.FuelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FUEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIESEL"] = 1; - values[valuesById[2] = "REGULAR_UNLEADED"] = 2; - values[valuesById[3] = "MIDGRADE"] = 3; - values[valuesById[4] = "PREMIUM"] = 4; - values[valuesById[5] = "SP91"] = 5; - values[valuesById[6] = "SP91_E10"] = 6; - values[valuesById[7] = "SP92"] = 7; - values[valuesById[8] = "SP95"] = 8; - values[valuesById[9] = "SP95_E10"] = 9; - values[valuesById[10] = "SP98"] = 10; - values[valuesById[11] = "SP99"] = 11; - values[valuesById[12] = "SP100"] = 12; - values[valuesById[13] = "LPG"] = 13; - values[valuesById[14] = "E80"] = 14; - values[valuesById[15] = "E85"] = 15; - values[valuesById[16] = "METHANE"] = 16; - values[valuesById[17] = "BIO_DIESEL"] = 17; - values[valuesById[18] = "TRUCK_DIESEL"] = 18; - return values; - })(); - - return FuelPrice; - })(); - - return FuelOptions; - })(); - - v1.Circle = (function() { - - /** - * Properties of a Circle. - * @memberof google.maps.places.v1 - * @interface ICircle - * @property {google.type.ILatLng|null} [center] Circle center - * @property {number|null} [radius] Circle radius - */ - - /** - * Constructs a new Circle. - * @memberof google.maps.places.v1 - * @classdesc Represents a Circle. - * @implements ICircle - * @constructor - * @param {google.maps.places.v1.ICircle=} [properties] Properties to set - */ - function Circle(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Circle center. - * @member {google.type.ILatLng|null|undefined} center - * @memberof google.maps.places.v1.Circle - * @instance - */ - Circle.prototype.center = null; - - /** - * Circle radius. - * @member {number} radius - * @memberof google.maps.places.v1.Circle - * @instance - */ - Circle.prototype.radius = 0; - - /** - * Creates a new Circle instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.ICircle=} [properties] Properties to set - * @returns {google.maps.places.v1.Circle} Circle instance - */ - Circle.create = function create(properties) { - return new Circle(properties); - }; - - /** - * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Circle.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.center != null && Object.hasOwnProperty.call(message, "center")) - $root.google.type.LatLng.encode(message.center, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.radius != null && Object.hasOwnProperty.call(message, "radius")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.radius); - return writer; - }; - - /** - * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Circle.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Circle message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Circle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Circle} Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Circle.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Circle(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.center = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 2: { - message.radius = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Circle message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Circle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Circle} Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Circle.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Circle message. - * @function verify - * @memberof google.maps.places.v1.Circle - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Circle.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.center != null && message.hasOwnProperty("center")) { - var error = $root.google.type.LatLng.verify(message.center); - if (error) - return "center." + error; - } - if (message.radius != null && message.hasOwnProperty("radius")) - if (typeof message.radius !== "number") - return "radius: number expected"; - return null; - }; - - /** - * Creates a Circle message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Circle - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Circle} Circle - */ - Circle.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Circle) - return object; - var message = new $root.google.maps.places.v1.Circle(); - if (object.center != null) { - if (typeof object.center !== "object") - throw TypeError(".google.maps.places.v1.Circle.center: object expected"); - message.center = $root.google.type.LatLng.fromObject(object.center); - } - if (object.radius != null) - message.radius = Number(object.radius); - return message; - }; - - /** - * Creates a plain object from a Circle message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.Circle} message Circle - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Circle.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.center = null; - object.radius = 0; - } - if (message.center != null && message.hasOwnProperty("center")) - object.center = $root.google.type.LatLng.toObject(message.center, options); - if (message.radius != null && message.hasOwnProperty("radius")) - object.radius = options.json && !isFinite(message.radius) ? String(message.radius) : message.radius; - return object; - }; - - /** - * Converts this Circle to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Circle - * @instance - * @returns {Object.} JSON object - */ - Circle.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Circle - * @function getTypeUrl - * @memberof google.maps.places.v1.Circle - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Circle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Circle"; - }; - - return Circle; - })(); - - v1.Place = (function() { - - /** - * Properties of a Place. - * @memberof google.maps.places.v1 - * @interface IPlace - * @property {string|null} [name] Place name - * @property {string|null} [id] Place id - * @property {google.type.ILocalizedText|null} [displayName] Place displayName - * @property {Array.|null} [types] Place types - * @property {string|null} [primaryType] Place primaryType - * @property {google.type.ILocalizedText|null} [primaryTypeDisplayName] Place primaryTypeDisplayName - * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber - * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber - * @property {string|null} [formattedAddress] Place formattedAddress - * @property {string|null} [shortFormattedAddress] Place shortFormattedAddress - * @property {Array.|null} [addressComponents] Place addressComponents - * @property {google.maps.places.v1.Place.IPlusCode|null} [plusCode] Place plusCode - * @property {google.type.ILatLng|null} [location] Place location - * @property {google.geo.type.IViewport|null} [viewport] Place viewport - * @property {number|null} [rating] Place rating - * @property {string|null} [googleMapsUri] Place googleMapsUri - * @property {string|null} [websiteUri] Place websiteUri - * @property {Array.|null} [reviews] Place reviews - * @property {google.maps.places.v1.Place.IOpeningHours|null} [regularOpeningHours] Place regularOpeningHours - * @property {number|null} [utcOffsetMinutes] Place utcOffsetMinutes - * @property {Array.|null} [photos] Place photos - * @property {string|null} [adrFormatAddress] Place adrFormatAddress - * @property {google.maps.places.v1.Place.BusinessStatus|null} [businessStatus] Place businessStatus - * @property {google.maps.places.v1.PriceLevel|null} [priceLevel] Place priceLevel - * @property {Array.|null} [attributions] Place attributions - * @property {number|null} [userRatingCount] Place userRatingCount - * @property {string|null} [iconMaskBaseUri] Place iconMaskBaseUri - * @property {string|null} [iconBackgroundColor] Place iconBackgroundColor - * @property {boolean|null} [takeout] Place takeout - * @property {boolean|null} [delivery] Place delivery - * @property {boolean|null} [dineIn] Place dineIn - * @property {boolean|null} [curbsidePickup] Place curbsidePickup - * @property {boolean|null} [reservable] Place reservable - * @property {boolean|null} [servesBreakfast] Place servesBreakfast - * @property {boolean|null} [servesLunch] Place servesLunch - * @property {boolean|null} [servesDinner] Place servesDinner - * @property {boolean|null} [servesBeer] Place servesBeer - * @property {boolean|null} [servesWine] Place servesWine - * @property {boolean|null} [servesBrunch] Place servesBrunch - * @property {boolean|null} [servesVegetarianFood] Place servesVegetarianFood - * @property {google.maps.places.v1.Place.IOpeningHours|null} [currentOpeningHours] Place currentOpeningHours - * @property {Array.|null} [currentSecondaryOpeningHours] Place currentSecondaryOpeningHours - * @property {Array.|null} [regularSecondaryOpeningHours] Place regularSecondaryOpeningHours - * @property {google.type.ILocalizedText|null} [editorialSummary] Place editorialSummary - * @property {boolean|null} [outdoorSeating] Place outdoorSeating - * @property {boolean|null} [liveMusic] Place liveMusic - * @property {boolean|null} [menuForChildren] Place menuForChildren - * @property {boolean|null} [servesCocktails] Place servesCocktails - * @property {boolean|null} [servesDessert] Place servesDessert - * @property {boolean|null} [servesCoffee] Place servesCoffee - * @property {boolean|null} [goodForChildren] Place goodForChildren - * @property {boolean|null} [allowsDogs] Place allowsDogs - * @property {boolean|null} [restroom] Place restroom - * @property {boolean|null} [goodForGroups] Place goodForGroups - * @property {boolean|null} [goodForWatchingSports] Place goodForWatchingSports - * @property {google.maps.places.v1.Place.IPaymentOptions|null} [paymentOptions] Place paymentOptions - * @property {google.maps.places.v1.Place.IParkingOptions|null} [parkingOptions] Place parkingOptions - * @property {Array.|null} [subDestinations] Place subDestinations - * @property {google.maps.places.v1.Place.IAccessibilityOptions|null} [accessibilityOptions] Place accessibilityOptions - * @property {google.maps.places.v1.IFuelOptions|null} [fuelOptions] Place fuelOptions - * @property {google.maps.places.v1.IEVChargeOptions|null} [evChargeOptions] Place evChargeOptions - * @property {google.maps.places.v1.Place.IGenerativeSummary|null} [generativeSummary] Place generativeSummary - * @property {google.maps.places.v1.Place.IAreaSummary|null} [areaSummary] Place areaSummary - */ - - /** - * Constructs a new Place. - * @memberof google.maps.places.v1 - * @classdesc Represents a Place. - * @implements IPlace - * @constructor - * @param {google.maps.places.v1.IPlace=} [properties] Properties to set - */ - function Place(properties) { - this.types = []; - this.addressComponents = []; - this.reviews = []; - this.photos = []; - this.attributions = []; - this.currentSecondaryOpeningHours = []; - this.regularSecondaryOpeningHours = []; - this.subDestinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Place name. - * @member {string} name - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.name = ""; - - /** - * Place id. - * @member {string} id - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.id = ""; - - /** - * Place displayName. - * @member {google.type.ILocalizedText|null|undefined} displayName - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.displayName = null; - - /** - * Place types. - * @member {Array.} types - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.types = $util.emptyArray; - - /** - * Place primaryType. - * @member {string} primaryType - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.primaryType = ""; - - /** - * Place primaryTypeDisplayName. - * @member {google.type.ILocalizedText|null|undefined} primaryTypeDisplayName - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.primaryTypeDisplayName = null; - - /** - * Place nationalPhoneNumber. - * @member {string} nationalPhoneNumber - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.nationalPhoneNumber = ""; - - /** - * Place internationalPhoneNumber. - * @member {string} internationalPhoneNumber - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.internationalPhoneNumber = ""; - - /** - * Place formattedAddress. - * @member {string} formattedAddress - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.formattedAddress = ""; - - /** - * Place shortFormattedAddress. - * @member {string} shortFormattedAddress - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.shortFormattedAddress = ""; - - /** - * Place addressComponents. - * @member {Array.} addressComponents - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.addressComponents = $util.emptyArray; - - /** - * Place plusCode. - * @member {google.maps.places.v1.Place.IPlusCode|null|undefined} plusCode - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.plusCode = null; - - /** - * Place location. - * @member {google.type.ILatLng|null|undefined} location - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.location = null; - - /** - * Place viewport. - * @member {google.geo.type.IViewport|null|undefined} viewport - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.viewport = null; - - /** - * Place rating. - * @member {number} rating - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.rating = 0; - - /** - * Place googleMapsUri. - * @member {string} googleMapsUri - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.googleMapsUri = ""; - - /** - * Place websiteUri. - * @member {string} websiteUri - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.websiteUri = ""; - - /** - * Place reviews. - * @member {Array.} reviews - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.reviews = $util.emptyArray; - - /** - * Place regularOpeningHours. - * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} regularOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.regularOpeningHours = null; - - /** - * Place utcOffsetMinutes. - * @member {number|null|undefined} utcOffsetMinutes - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.utcOffsetMinutes = null; - - /** - * Place photos. - * @member {Array.} photos - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.photos = $util.emptyArray; - - /** - * Place adrFormatAddress. - * @member {string} adrFormatAddress - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.adrFormatAddress = ""; - - /** - * Place businessStatus. - * @member {google.maps.places.v1.Place.BusinessStatus} businessStatus - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.businessStatus = 0; - - /** - * Place priceLevel. - * @member {google.maps.places.v1.PriceLevel} priceLevel - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.priceLevel = 0; - - /** - * Place attributions. - * @member {Array.} attributions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.attributions = $util.emptyArray; - - /** - * Place userRatingCount. - * @member {number|null|undefined} userRatingCount - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.userRatingCount = null; - - /** - * Place iconMaskBaseUri. - * @member {string} iconMaskBaseUri - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.iconMaskBaseUri = ""; - - /** - * Place iconBackgroundColor. - * @member {string} iconBackgroundColor - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.iconBackgroundColor = ""; - - /** - * Place takeout. - * @member {boolean|null|undefined} takeout - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.takeout = null; - - /** - * Place delivery. - * @member {boolean|null|undefined} delivery - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.delivery = null; - - /** - * Place dineIn. - * @member {boolean|null|undefined} dineIn - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.dineIn = null; - - /** - * Place curbsidePickup. - * @member {boolean|null|undefined} curbsidePickup - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.curbsidePickup = null; - - /** - * Place reservable. - * @member {boolean|null|undefined} reservable - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.reservable = null; - - /** - * Place servesBreakfast. - * @member {boolean|null|undefined} servesBreakfast - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesBreakfast = null; - - /** - * Place servesLunch. - * @member {boolean|null|undefined} servesLunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesLunch = null; - - /** - * Place servesDinner. - * @member {boolean|null|undefined} servesDinner - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesDinner = null; - - /** - * Place servesBeer. - * @member {boolean|null|undefined} servesBeer - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesBeer = null; - - /** - * Place servesWine. - * @member {boolean|null|undefined} servesWine - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesWine = null; - - /** - * Place servesBrunch. - * @member {boolean|null|undefined} servesBrunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesBrunch = null; - - /** - * Place servesVegetarianFood. - * @member {boolean|null|undefined} servesVegetarianFood - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesVegetarianFood = null; - - /** - * Place currentOpeningHours. - * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} currentOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.currentOpeningHours = null; - - /** - * Place currentSecondaryOpeningHours. - * @member {Array.} currentSecondaryOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.currentSecondaryOpeningHours = $util.emptyArray; - - /** - * Place regularSecondaryOpeningHours. - * @member {Array.} regularSecondaryOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.regularSecondaryOpeningHours = $util.emptyArray; - - /** - * Place editorialSummary. - * @member {google.type.ILocalizedText|null|undefined} editorialSummary - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.editorialSummary = null; - - /** - * Place outdoorSeating. - * @member {boolean|null|undefined} outdoorSeating - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.outdoorSeating = null; - - /** - * Place liveMusic. - * @member {boolean|null|undefined} liveMusic - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.liveMusic = null; - - /** - * Place menuForChildren. - * @member {boolean|null|undefined} menuForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.menuForChildren = null; - - /** - * Place servesCocktails. - * @member {boolean|null|undefined} servesCocktails - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesCocktails = null; - - /** - * Place servesDessert. - * @member {boolean|null|undefined} servesDessert - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesDessert = null; - - /** - * Place servesCoffee. - * @member {boolean|null|undefined} servesCoffee - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesCoffee = null; - - /** - * Place goodForChildren. - * @member {boolean|null|undefined} goodForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForChildren = null; - - /** - * Place allowsDogs. - * @member {boolean|null|undefined} allowsDogs - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.allowsDogs = null; - - /** - * Place restroom. - * @member {boolean|null|undefined} restroom - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.restroom = null; - - /** - * Place goodForGroups. - * @member {boolean|null|undefined} goodForGroups - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForGroups = null; - - /** - * Place goodForWatchingSports. - * @member {boolean|null|undefined} goodForWatchingSports - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForWatchingSports = null; - - /** - * Place paymentOptions. - * @member {google.maps.places.v1.Place.IPaymentOptions|null|undefined} paymentOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.paymentOptions = null; - - /** - * Place parkingOptions. - * @member {google.maps.places.v1.Place.IParkingOptions|null|undefined} parkingOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.parkingOptions = null; - - /** - * Place subDestinations. - * @member {Array.} subDestinations - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.subDestinations = $util.emptyArray; - - /** - * Place accessibilityOptions. - * @member {google.maps.places.v1.Place.IAccessibilityOptions|null|undefined} accessibilityOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.accessibilityOptions = null; - - /** - * Place fuelOptions. - * @member {google.maps.places.v1.IFuelOptions|null|undefined} fuelOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.fuelOptions = null; - - /** - * Place evChargeOptions. - * @member {google.maps.places.v1.IEVChargeOptions|null|undefined} evChargeOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.evChargeOptions = null; - - /** - * Place generativeSummary. - * @member {google.maps.places.v1.Place.IGenerativeSummary|null|undefined} generativeSummary - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.generativeSummary = null; - - /** - * Place areaSummary. - * @member {google.maps.places.v1.Place.IAreaSummary|null|undefined} areaSummary - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.areaSummary = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Place _utcOffsetMinutes. - * @member {"utcOffsetMinutes"|undefined} _utcOffsetMinutes - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_utcOffsetMinutes", { - get: $util.oneOfGetter($oneOfFields = ["utcOffsetMinutes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _userRatingCount. - * @member {"userRatingCount"|undefined} _userRatingCount - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_userRatingCount", { - get: $util.oneOfGetter($oneOfFields = ["userRatingCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _takeout. - * @member {"takeout"|undefined} _takeout - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_takeout", { - get: $util.oneOfGetter($oneOfFields = ["takeout"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _delivery. - * @member {"delivery"|undefined} _delivery - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_delivery", { - get: $util.oneOfGetter($oneOfFields = ["delivery"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _dineIn. - * @member {"dineIn"|undefined} _dineIn - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_dineIn", { - get: $util.oneOfGetter($oneOfFields = ["dineIn"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _curbsidePickup. - * @member {"curbsidePickup"|undefined} _curbsidePickup - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_curbsidePickup", { - get: $util.oneOfGetter($oneOfFields = ["curbsidePickup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _reservable. - * @member {"reservable"|undefined} _reservable - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_reservable", { - get: $util.oneOfGetter($oneOfFields = ["reservable"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesBreakfast. - * @member {"servesBreakfast"|undefined} _servesBreakfast - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBreakfast", { - get: $util.oneOfGetter($oneOfFields = ["servesBreakfast"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesLunch. - * @member {"servesLunch"|undefined} _servesLunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesLunch", { - get: $util.oneOfGetter($oneOfFields = ["servesLunch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesDinner. - * @member {"servesDinner"|undefined} _servesDinner - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesDinner", { - get: $util.oneOfGetter($oneOfFields = ["servesDinner"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesBeer. - * @member {"servesBeer"|undefined} _servesBeer - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBeer", { - get: $util.oneOfGetter($oneOfFields = ["servesBeer"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesWine. - * @member {"servesWine"|undefined} _servesWine - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesWine", { - get: $util.oneOfGetter($oneOfFields = ["servesWine"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesBrunch. - * @member {"servesBrunch"|undefined} _servesBrunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBrunch", { - get: $util.oneOfGetter($oneOfFields = ["servesBrunch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesVegetarianFood. - * @member {"servesVegetarianFood"|undefined} _servesVegetarianFood - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesVegetarianFood", { - get: $util.oneOfGetter($oneOfFields = ["servesVegetarianFood"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _outdoorSeating. - * @member {"outdoorSeating"|undefined} _outdoorSeating - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_outdoorSeating", { - get: $util.oneOfGetter($oneOfFields = ["outdoorSeating"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _liveMusic. - * @member {"liveMusic"|undefined} _liveMusic - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_liveMusic", { - get: $util.oneOfGetter($oneOfFields = ["liveMusic"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _menuForChildren. - * @member {"menuForChildren"|undefined} _menuForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_menuForChildren", { - get: $util.oneOfGetter($oneOfFields = ["menuForChildren"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesCocktails. - * @member {"servesCocktails"|undefined} _servesCocktails - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesCocktails", { - get: $util.oneOfGetter($oneOfFields = ["servesCocktails"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesDessert. - * @member {"servesDessert"|undefined} _servesDessert - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesDessert", { - get: $util.oneOfGetter($oneOfFields = ["servesDessert"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _servesCoffee. - * @member {"servesCoffee"|undefined} _servesCoffee - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesCoffee", { - get: $util.oneOfGetter($oneOfFields = ["servesCoffee"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _goodForChildren. - * @member {"goodForChildren"|undefined} _goodForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForChildren", { - get: $util.oneOfGetter($oneOfFields = ["goodForChildren"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _allowsDogs. - * @member {"allowsDogs"|undefined} _allowsDogs - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_allowsDogs", { - get: $util.oneOfGetter($oneOfFields = ["allowsDogs"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _restroom. - * @member {"restroom"|undefined} _restroom - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_restroom", { - get: $util.oneOfGetter($oneOfFields = ["restroom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _goodForGroups. - * @member {"goodForGroups"|undefined} _goodForGroups - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForGroups", { - get: $util.oneOfGetter($oneOfFields = ["goodForGroups"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _goodForWatchingSports. - * @member {"goodForWatchingSports"|undefined} _goodForWatchingSports - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForWatchingSports", { - get: $util.oneOfGetter($oneOfFields = ["goodForWatchingSports"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _accessibilityOptions. - * @member {"accessibilityOptions"|undefined} _accessibilityOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_accessibilityOptions", { - get: $util.oneOfGetter($oneOfFields = ["accessibilityOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Place instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place - * @static - * @param {google.maps.places.v1.IPlace=} [properties] Properties to set - * @returns {google.maps.places.v1.Place} Place instance - */ - Place.create = function create(properties) { - return new Place(properties); - }; - - /** - * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place - * @static - * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Place.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); - if (message.nationalPhoneNumber != null && Object.hasOwnProperty.call(message, "nationalPhoneNumber")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.nationalPhoneNumber); - if (message.internationalPhoneNumber != null && Object.hasOwnProperty.call(message, "internationalPhoneNumber")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.internationalPhoneNumber); - if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.formattedAddress); - if (message.addressComponents != null && message.addressComponents.length) - for (var i = 0; i < message.addressComponents.length; ++i) - $root.google.maps.places.v1.Place.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode")) - $root.google.maps.places.v1.Place.PlusCode.encode(message.plusCode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.viewport != null && Object.hasOwnProperty.call(message, "viewport")) - $root.google.geo.type.Viewport.encode(message.viewport, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) - writer.uint32(/* id 14, wireType 1 =*/113).double(message.rating); - if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.googleMapsUri); - if (message.websiteUri != null && Object.hasOwnProperty.call(message, "websiteUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.websiteUri); - if (message.regularOpeningHours != null && Object.hasOwnProperty.call(message, "regularOpeningHours")) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularOpeningHours, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.utcOffsetMinutes != null && Object.hasOwnProperty.call(message, "utcOffsetMinutes")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.utcOffsetMinutes); - if (message.adrFormatAddress != null && Object.hasOwnProperty.call(message, "adrFormatAddress")) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.adrFormatAddress); - if (message.businessStatus != null && Object.hasOwnProperty.call(message, "businessStatus")) - writer.uint32(/* id 25, wireType 0 =*/200).int32(message.businessStatus); - if (message.priceLevel != null && Object.hasOwnProperty.call(message, "priceLevel")) - writer.uint32(/* id 26, wireType 0 =*/208).int32(message.priceLevel); - if (message.attributions != null && message.attributions.length) - for (var i = 0; i < message.attributions.length; ++i) - $root.google.maps.places.v1.Place.Attribution.encode(message.attributions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.userRatingCount != null && Object.hasOwnProperty.call(message, "userRatingCount")) - writer.uint32(/* id 28, wireType 0 =*/224).int32(message.userRatingCount); - if (message.iconMaskBaseUri != null && Object.hasOwnProperty.call(message, "iconMaskBaseUri")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.iconMaskBaseUri); - if (message.iconBackgroundColor != null && Object.hasOwnProperty.call(message, "iconBackgroundColor")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.iconBackgroundColor); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - $root.google.type.LocalizedText.encode(message.displayName, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.primaryTypeDisplayName != null && Object.hasOwnProperty.call(message, "primaryTypeDisplayName")) - $root.google.type.LocalizedText.encode(message.primaryTypeDisplayName, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.takeout); - if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) - writer.uint32(/* id 34, wireType 0 =*/272).bool(message.delivery); - if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) - writer.uint32(/* id 35, wireType 0 =*/280).bool(message.dineIn); - if (message.curbsidePickup != null && Object.hasOwnProperty.call(message, "curbsidePickup")) - writer.uint32(/* id 36, wireType 0 =*/288).bool(message.curbsidePickup); - if (message.reservable != null && Object.hasOwnProperty.call(message, "reservable")) - writer.uint32(/* id 38, wireType 0 =*/304).bool(message.reservable); - if (message.servesBreakfast != null && Object.hasOwnProperty.call(message, "servesBreakfast")) - writer.uint32(/* id 39, wireType 0 =*/312).bool(message.servesBreakfast); - if (message.servesLunch != null && Object.hasOwnProperty.call(message, "servesLunch")) - writer.uint32(/* id 40, wireType 0 =*/320).bool(message.servesLunch); - if (message.servesDinner != null && Object.hasOwnProperty.call(message, "servesDinner")) - writer.uint32(/* id 41, wireType 0 =*/328).bool(message.servesDinner); - if (message.servesBeer != null && Object.hasOwnProperty.call(message, "servesBeer")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.servesBeer); - if (message.servesWine != null && Object.hasOwnProperty.call(message, "servesWine")) - writer.uint32(/* id 43, wireType 0 =*/344).bool(message.servesWine); - if (message.servesBrunch != null && Object.hasOwnProperty.call(message, "servesBrunch")) - writer.uint32(/* id 44, wireType 0 =*/352).bool(message.servesBrunch); - if (message.servesVegetarianFood != null && Object.hasOwnProperty.call(message, "servesVegetarianFood")) - writer.uint32(/* id 45, wireType 0 =*/360).bool(message.servesVegetarianFood); - if (message.currentOpeningHours != null && Object.hasOwnProperty.call(message, "currentOpeningHours")) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentOpeningHours, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.currentSecondaryOpeningHours != null && message.currentSecondaryOpeningHours.length) - for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentSecondaryOpeningHours[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.regularSecondaryOpeningHours != null && message.regularSecondaryOpeningHours.length) - for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularSecondaryOpeningHours[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.primaryType != null && Object.hasOwnProperty.call(message, "primaryType")) - writer.uint32(/* id 50, wireType 2 =*/402).string(message.primaryType); - if (message.shortFormattedAddress != null && Object.hasOwnProperty.call(message, "shortFormattedAddress")) - writer.uint32(/* id 51, wireType 2 =*/410).string(message.shortFormattedAddress); - if (message.editorialSummary != null && Object.hasOwnProperty.call(message, "editorialSummary")) - $root.google.type.LocalizedText.encode(message.editorialSummary, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.reviews != null && message.reviews.length) - for (var i = 0; i < message.reviews.length; ++i) - $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.photos != null && message.photos.length) - for (var i = 0; i < message.photos.length; ++i) - $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); - if (message.outdoorSeating != null && Object.hasOwnProperty.call(message, "outdoorSeating")) - writer.uint32(/* id 55, wireType 0 =*/440).bool(message.outdoorSeating); - if (message.liveMusic != null && Object.hasOwnProperty.call(message, "liveMusic")) - writer.uint32(/* id 56, wireType 0 =*/448).bool(message.liveMusic); - if (message.menuForChildren != null && Object.hasOwnProperty.call(message, "menuForChildren")) - writer.uint32(/* id 57, wireType 0 =*/456).bool(message.menuForChildren); - if (message.servesCocktails != null && Object.hasOwnProperty.call(message, "servesCocktails")) - writer.uint32(/* id 58, wireType 0 =*/464).bool(message.servesCocktails); - if (message.servesDessert != null && Object.hasOwnProperty.call(message, "servesDessert")) - writer.uint32(/* id 59, wireType 0 =*/472).bool(message.servesDessert); - if (message.servesCoffee != null && Object.hasOwnProperty.call(message, "servesCoffee")) - writer.uint32(/* id 60, wireType 0 =*/480).bool(message.servesCoffee); - if (message.goodForChildren != null && Object.hasOwnProperty.call(message, "goodForChildren")) - writer.uint32(/* id 62, wireType 0 =*/496).bool(message.goodForChildren); - if (message.allowsDogs != null && Object.hasOwnProperty.call(message, "allowsDogs")) - writer.uint32(/* id 63, wireType 0 =*/504).bool(message.allowsDogs); - if (message.restroom != null && Object.hasOwnProperty.call(message, "restroom")) - writer.uint32(/* id 64, wireType 0 =*/512).bool(message.restroom); - if (message.goodForGroups != null && Object.hasOwnProperty.call(message, "goodForGroups")) - writer.uint32(/* id 65, wireType 0 =*/520).bool(message.goodForGroups); - if (message.goodForWatchingSports != null && Object.hasOwnProperty.call(message, "goodForWatchingSports")) - writer.uint32(/* id 66, wireType 0 =*/528).bool(message.goodForWatchingSports); - if (message.paymentOptions != null && Object.hasOwnProperty.call(message, "paymentOptions")) - $root.google.maps.places.v1.Place.PaymentOptions.encode(message.paymentOptions, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.parkingOptions != null && Object.hasOwnProperty.call(message, "parkingOptions")) - $root.google.maps.places.v1.Place.ParkingOptions.encode(message.parkingOptions, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim(); - if (message.subDestinations != null && message.subDestinations.length) - for (var i = 0; i < message.subDestinations.length; ++i) - $root.google.maps.places.v1.Place.SubDestination.encode(message.subDestinations[i], writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim(); - if (message.accessibilityOptions != null && Object.hasOwnProperty.call(message, "accessibilityOptions")) - $root.google.maps.places.v1.Place.AccessibilityOptions.encode(message.accessibilityOptions, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); - if (message.fuelOptions != null && Object.hasOwnProperty.call(message, "fuelOptions")) - $root.google.maps.places.v1.FuelOptions.encode(message.fuelOptions, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); - if (message.evChargeOptions != null && Object.hasOwnProperty.call(message, "evChargeOptions")) - $root.google.maps.places.v1.EVChargeOptions.encode(message.evChargeOptions, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); - if (message.generativeSummary != null && Object.hasOwnProperty.call(message, "generativeSummary")) - $root.google.maps.places.v1.Place.GenerativeSummary.encode(message.generativeSummary, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim(); - if (message.areaSummary != null && Object.hasOwnProperty.call(message, "areaSummary")) - $root.google.maps.places.v1.Place.AreaSummary.encode(message.areaSummary, writer.uint32(/* id 81, wireType 2 =*/650).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place - * @static - * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Place.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Place message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place} Place - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Place.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.id = reader.string(); - break; - } - case 31: { - message.displayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 50: { - message.primaryType = reader.string(); - break; - } - case 32: { - message.primaryTypeDisplayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 7: { - message.nationalPhoneNumber = reader.string(); - break; - } - case 8: { - message.internationalPhoneNumber = reader.string(); - break; - } - case 9: { - message.formattedAddress = reader.string(); - break; - } - case 51: { - message.shortFormattedAddress = reader.string(); - break; - } - case 10: { - if (!(message.addressComponents && message.addressComponents.length)) - message.addressComponents = []; - message.addressComponents.push($root.google.maps.places.v1.Place.AddressComponent.decode(reader, reader.uint32())); - break; - } - case 11: { - message.plusCode = $root.google.maps.places.v1.Place.PlusCode.decode(reader, reader.uint32()); - break; - } - case 12: { - message.location = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 13: { - message.viewport = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 14: { - message.rating = reader.double(); - break; - } - case 15: { - message.googleMapsUri = reader.string(); - break; - } - case 16: { - message.websiteUri = reader.string(); - break; - } - case 53: { - if (!(message.reviews && message.reviews.length)) - message.reviews = []; - message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); - break; - } - case 21: { - message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); - break; - } - case 22: { - message.utcOffsetMinutes = reader.int32(); - break; - } - case 54: { - if (!(message.photos && message.photos.length)) - message.photos = []; - message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); - break; - } - case 24: { - message.adrFormatAddress = reader.string(); - break; - } - case 25: { - message.businessStatus = reader.int32(); - break; - } - case 26: { - message.priceLevel = reader.int32(); - break; - } - case 27: { - if (!(message.attributions && message.attributions.length)) - message.attributions = []; - message.attributions.push($root.google.maps.places.v1.Place.Attribution.decode(reader, reader.uint32())); - break; - } - case 28: { - message.userRatingCount = reader.int32(); - break; - } - case 29: { - message.iconMaskBaseUri = reader.string(); - break; - } - case 30: { - message.iconBackgroundColor = reader.string(); - break; - } - case 33: { - message.takeout = reader.bool(); - break; - } - case 34: { - message.delivery = reader.bool(); - break; - } - case 35: { - message.dineIn = reader.bool(); - break; - } - case 36: { - message.curbsidePickup = reader.bool(); - break; - } - case 38: { - message.reservable = reader.bool(); - break; - } - case 39: { - message.servesBreakfast = reader.bool(); - break; - } - case 40: { - message.servesLunch = reader.bool(); - break; - } - case 41: { - message.servesDinner = reader.bool(); - break; - } - case 42: { - message.servesBeer = reader.bool(); - break; - } - case 43: { - message.servesWine = reader.bool(); - break; - } - case 44: { - message.servesBrunch = reader.bool(); - break; - } - case 45: { - message.servesVegetarianFood = reader.bool(); - break; - } - case 46: { - message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); - break; - } - case 47: { - if (!(message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length)) - message.currentSecondaryOpeningHours = []; - message.currentSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); - break; - } - case 49: { - if (!(message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length)) - message.regularSecondaryOpeningHours = []; - message.regularSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); - break; - } - case 52: { - message.editorialSummary = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 55: { - message.outdoorSeating = reader.bool(); - break; - } - case 56: { - message.liveMusic = reader.bool(); - break; - } - case 57: { - message.menuForChildren = reader.bool(); - break; - } - case 58: { - message.servesCocktails = reader.bool(); - break; - } - case 59: { - message.servesDessert = reader.bool(); - break; - } - case 60: { - message.servesCoffee = reader.bool(); - break; - } - case 62: { - message.goodForChildren = reader.bool(); - break; - } - case 63: { - message.allowsDogs = reader.bool(); - break; - } - case 64: { - message.restroom = reader.bool(); - break; - } - case 65: { - message.goodForGroups = reader.bool(); - break; - } - case 66: { - message.goodForWatchingSports = reader.bool(); - break; - } - case 67: { - message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.decode(reader, reader.uint32()); - break; - } - case 70: { - message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.decode(reader, reader.uint32()); - break; - } - case 71: { - if (!(message.subDestinations && message.subDestinations.length)) - message.subDestinations = []; - message.subDestinations.push($root.google.maps.places.v1.Place.SubDestination.decode(reader, reader.uint32())); - break; - } - case 72: { - message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.decode(reader, reader.uint32()); - break; - } - case 78: { - message.fuelOptions = $root.google.maps.places.v1.FuelOptions.decode(reader, reader.uint32()); - break; - } - case 79: { - message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.decode(reader, reader.uint32()); - break; - } - case 80: { - message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.decode(reader, reader.uint32()); - break; - } - case 81: { - message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Place message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place} Place - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Place.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Place message. - * @function verify - * @memberof google.maps.places.v1.Place - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Place.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) { - var error = $root.google.type.LocalizedText.verify(message.displayName); - if (error) - return "displayName." + error; - } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.primaryType != null && message.hasOwnProperty("primaryType")) - if (!$util.isString(message.primaryType)) - return "primaryType: string expected"; - if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) { - var error = $root.google.type.LocalizedText.verify(message.primaryTypeDisplayName); - if (error) - return "primaryTypeDisplayName." + error; - } - if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) - if (!$util.isString(message.nationalPhoneNumber)) - return "nationalPhoneNumber: string expected"; - if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) - if (!$util.isString(message.internationalPhoneNumber)) - return "internationalPhoneNumber: string expected"; - if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) - if (!$util.isString(message.formattedAddress)) - return "formattedAddress: string expected"; - if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) - if (!$util.isString(message.shortFormattedAddress)) - return "shortFormattedAddress: string expected"; - if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) { - if (!Array.isArray(message.addressComponents)) - return "addressComponents: array expected"; - for (var i = 0; i < message.addressComponents.length; ++i) { - var error = $root.google.maps.places.v1.Place.AddressComponent.verify(message.addressComponents[i]); - if (error) - return "addressComponents." + error; - } - } - if (message.plusCode != null && message.hasOwnProperty("plusCode")) { - var error = $root.google.maps.places.v1.Place.PlusCode.verify(message.plusCode); - if (error) - return "plusCode." + error; - } - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.type.LatLng.verify(message.location); - if (error) - return "location." + error; - } - if (message.viewport != null && message.hasOwnProperty("viewport")) { - var error = $root.google.geo.type.Viewport.verify(message.viewport); - if (error) - return "viewport." + error; - } - if (message.rating != null && message.hasOwnProperty("rating")) - if (typeof message.rating !== "number") - return "rating: number expected"; - if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) - if (!$util.isString(message.googleMapsUri)) - return "googleMapsUri: string expected"; - if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) - if (!$util.isString(message.websiteUri)) - return "websiteUri: string expected"; - if (message.reviews != null && message.hasOwnProperty("reviews")) { - if (!Array.isArray(message.reviews)) - return "reviews: array expected"; - for (var i = 0; i < message.reviews.length; ++i) { - var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); - if (error) - return "reviews." + error; - } - } - if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularOpeningHours); - if (error) - return "regularOpeningHours." + error; - } - if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { - properties._utcOffsetMinutes = 1; - if (!$util.isInteger(message.utcOffsetMinutes)) - return "utcOffsetMinutes: integer expected"; - } - if (message.photos != null && message.hasOwnProperty("photos")) { - if (!Array.isArray(message.photos)) - return "photos: array expected"; - for (var i = 0; i < message.photos.length; ++i) { - var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); - if (error) - return "photos." + error; - } - } - if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) - if (!$util.isString(message.adrFormatAddress)) - return "adrFormatAddress: string expected"; - if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) - switch (message.businessStatus) { - default: - return "businessStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) - switch (message.priceLevel) { - default: - return "priceLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.attributions != null && message.hasOwnProperty("attributions")) { - if (!Array.isArray(message.attributions)) - return "attributions: array expected"; - for (var i = 0; i < message.attributions.length; ++i) { - var error = $root.google.maps.places.v1.Place.Attribution.verify(message.attributions[i]); - if (error) - return "attributions." + error; - } - } - if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { - properties._userRatingCount = 1; - if (!$util.isInteger(message.userRatingCount)) - return "userRatingCount: integer expected"; - } - if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) - if (!$util.isString(message.iconMaskBaseUri)) - return "iconMaskBaseUri: string expected"; - if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) - if (!$util.isString(message.iconBackgroundColor)) - return "iconBackgroundColor: string expected"; - if (message.takeout != null && message.hasOwnProperty("takeout")) { - properties._takeout = 1; - if (typeof message.takeout !== "boolean") - return "takeout: boolean expected"; - } - if (message.delivery != null && message.hasOwnProperty("delivery")) { - properties._delivery = 1; - if (typeof message.delivery !== "boolean") - return "delivery: boolean expected"; - } - if (message.dineIn != null && message.hasOwnProperty("dineIn")) { - properties._dineIn = 1; - if (typeof message.dineIn !== "boolean") - return "dineIn: boolean expected"; - } - if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { - properties._curbsidePickup = 1; - if (typeof message.curbsidePickup !== "boolean") - return "curbsidePickup: boolean expected"; - } - if (message.reservable != null && message.hasOwnProperty("reservable")) { - properties._reservable = 1; - if (typeof message.reservable !== "boolean") - return "reservable: boolean expected"; - } - if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { - properties._servesBreakfast = 1; - if (typeof message.servesBreakfast !== "boolean") - return "servesBreakfast: boolean expected"; - } - if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { - properties._servesLunch = 1; - if (typeof message.servesLunch !== "boolean") - return "servesLunch: boolean expected"; - } - if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { - properties._servesDinner = 1; - if (typeof message.servesDinner !== "boolean") - return "servesDinner: boolean expected"; - } - if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { - properties._servesBeer = 1; - if (typeof message.servesBeer !== "boolean") - return "servesBeer: boolean expected"; - } - if (message.servesWine != null && message.hasOwnProperty("servesWine")) { - properties._servesWine = 1; - if (typeof message.servesWine !== "boolean") - return "servesWine: boolean expected"; - } - if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { - properties._servesBrunch = 1; - if (typeof message.servesBrunch !== "boolean") - return "servesBrunch: boolean expected"; - } - if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { - properties._servesVegetarianFood = 1; - if (typeof message.servesVegetarianFood !== "boolean") - return "servesVegetarianFood: boolean expected"; - } - if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentOpeningHours); - if (error) - return "currentOpeningHours." + error; - } - if (message.currentSecondaryOpeningHours != null && message.hasOwnProperty("currentSecondaryOpeningHours")) { - if (!Array.isArray(message.currentSecondaryOpeningHours)) - return "currentSecondaryOpeningHours: array expected"; - for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentSecondaryOpeningHours[i]); - if (error) - return "currentSecondaryOpeningHours." + error; - } - } - if (message.regularSecondaryOpeningHours != null && message.hasOwnProperty("regularSecondaryOpeningHours")) { - if (!Array.isArray(message.regularSecondaryOpeningHours)) - return "regularSecondaryOpeningHours: array expected"; - for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularSecondaryOpeningHours[i]); - if (error) - return "regularSecondaryOpeningHours." + error; - } - } - if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) { - var error = $root.google.type.LocalizedText.verify(message.editorialSummary); - if (error) - return "editorialSummary." + error; - } - if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { - properties._outdoorSeating = 1; - if (typeof message.outdoorSeating !== "boolean") - return "outdoorSeating: boolean expected"; - } - if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { - properties._liveMusic = 1; - if (typeof message.liveMusic !== "boolean") - return "liveMusic: boolean expected"; - } - if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { - properties._menuForChildren = 1; - if (typeof message.menuForChildren !== "boolean") - return "menuForChildren: boolean expected"; - } - if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { - properties._servesCocktails = 1; - if (typeof message.servesCocktails !== "boolean") - return "servesCocktails: boolean expected"; - } - if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { - properties._servesDessert = 1; - if (typeof message.servesDessert !== "boolean") - return "servesDessert: boolean expected"; - } - if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { - properties._servesCoffee = 1; - if (typeof message.servesCoffee !== "boolean") - return "servesCoffee: boolean expected"; - } - if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { - properties._goodForChildren = 1; - if (typeof message.goodForChildren !== "boolean") - return "goodForChildren: boolean expected"; - } - if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { - properties._allowsDogs = 1; - if (typeof message.allowsDogs !== "boolean") - return "allowsDogs: boolean expected"; - } - if (message.restroom != null && message.hasOwnProperty("restroom")) { - properties._restroom = 1; - if (typeof message.restroom !== "boolean") - return "restroom: boolean expected"; - } - if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { - properties._goodForGroups = 1; - if (typeof message.goodForGroups !== "boolean") - return "goodForGroups: boolean expected"; - } - if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { - properties._goodForWatchingSports = 1; - if (typeof message.goodForWatchingSports !== "boolean") - return "goodForWatchingSports: boolean expected"; - } - if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) { - var error = $root.google.maps.places.v1.Place.PaymentOptions.verify(message.paymentOptions); - if (error) - return "paymentOptions." + error; - } - if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) { - var error = $root.google.maps.places.v1.Place.ParkingOptions.verify(message.parkingOptions); - if (error) - return "parkingOptions." + error; - } - if (message.subDestinations != null && message.hasOwnProperty("subDestinations")) { - if (!Array.isArray(message.subDestinations)) - return "subDestinations: array expected"; - for (var i = 0; i < message.subDestinations.length; ++i) { - var error = $root.google.maps.places.v1.Place.SubDestination.verify(message.subDestinations[i]); - if (error) - return "subDestinations." + error; - } - } - if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { - properties._accessibilityOptions = 1; - { - var error = $root.google.maps.places.v1.Place.AccessibilityOptions.verify(message.accessibilityOptions); - if (error) - return "accessibilityOptions." + error; - } - } - if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) { - var error = $root.google.maps.places.v1.FuelOptions.verify(message.fuelOptions); - if (error) - return "fuelOptions." + error; - } - if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) { - var error = $root.google.maps.places.v1.EVChargeOptions.verify(message.evChargeOptions); - if (error) - return "evChargeOptions." + error; - } - if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) { - var error = $root.google.maps.places.v1.Place.GenerativeSummary.verify(message.generativeSummary); - if (error) - return "generativeSummary." + error; - } - if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) { - var error = $root.google.maps.places.v1.Place.AreaSummary.verify(message.areaSummary); - if (error) - return "areaSummary." + error; - } - return null; - }; - - /** - * Creates a Place message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place} Place - */ - Place.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place) - return object; - var message = new $root.google.maps.places.v1.Place(); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.displayName != null) { - if (typeof object.displayName !== "object") - throw TypeError(".google.maps.places.v1.Place.displayName: object expected"); - message.displayName = $root.google.type.LocalizedText.fromObject(object.displayName); - } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.Place.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.primaryType != null) - message.primaryType = String(object.primaryType); - if (object.primaryTypeDisplayName != null) { - if (typeof object.primaryTypeDisplayName !== "object") - throw TypeError(".google.maps.places.v1.Place.primaryTypeDisplayName: object expected"); - message.primaryTypeDisplayName = $root.google.type.LocalizedText.fromObject(object.primaryTypeDisplayName); - } - if (object.nationalPhoneNumber != null) - message.nationalPhoneNumber = String(object.nationalPhoneNumber); - if (object.internationalPhoneNumber != null) - message.internationalPhoneNumber = String(object.internationalPhoneNumber); - if (object.formattedAddress != null) - message.formattedAddress = String(object.formattedAddress); - if (object.shortFormattedAddress != null) - message.shortFormattedAddress = String(object.shortFormattedAddress); - if (object.addressComponents) { - if (!Array.isArray(object.addressComponents)) - throw TypeError(".google.maps.places.v1.Place.addressComponents: array expected"); - message.addressComponents = []; - for (var i = 0; i < object.addressComponents.length; ++i) { - if (typeof object.addressComponents[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.addressComponents: object expected"); - message.addressComponents[i] = $root.google.maps.places.v1.Place.AddressComponent.fromObject(object.addressComponents[i]); - } - } - if (object.plusCode != null) { - if (typeof object.plusCode !== "object") - throw TypeError(".google.maps.places.v1.Place.plusCode: object expected"); - message.plusCode = $root.google.maps.places.v1.Place.PlusCode.fromObject(object.plusCode); - } - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.maps.places.v1.Place.location: object expected"); - message.location = $root.google.type.LatLng.fromObject(object.location); - } - if (object.viewport != null) { - if (typeof object.viewport !== "object") - throw TypeError(".google.maps.places.v1.Place.viewport: object expected"); - message.viewport = $root.google.geo.type.Viewport.fromObject(object.viewport); - } - if (object.rating != null) - message.rating = Number(object.rating); - if (object.googleMapsUri != null) - message.googleMapsUri = String(object.googleMapsUri); - if (object.websiteUri != null) - message.websiteUri = String(object.websiteUri); - if (object.reviews) { - if (!Array.isArray(object.reviews)) - throw TypeError(".google.maps.places.v1.Place.reviews: array expected"); - message.reviews = []; - for (var i = 0; i < object.reviews.length; ++i) { - if (typeof object.reviews[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.reviews: object expected"); - message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); - } - } - if (object.regularOpeningHours != null) { - if (typeof object.regularOpeningHours !== "object") - throw TypeError(".google.maps.places.v1.Place.regularOpeningHours: object expected"); - message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularOpeningHours); - } - if (object.utcOffsetMinutes != null) - message.utcOffsetMinutes = object.utcOffsetMinutes | 0; - if (object.photos) { - if (!Array.isArray(object.photos)) - throw TypeError(".google.maps.places.v1.Place.photos: array expected"); - message.photos = []; - for (var i = 0; i < object.photos.length; ++i) { - if (typeof object.photos[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.photos: object expected"); - message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); - } - } - if (object.adrFormatAddress != null) - message.adrFormatAddress = String(object.adrFormatAddress); - switch (object.businessStatus) { - default: - if (typeof object.businessStatus === "number") { - message.businessStatus = object.businessStatus; - break; - } - break; - case "BUSINESS_STATUS_UNSPECIFIED": - case 0: - message.businessStatus = 0; - break; - case "OPERATIONAL": - case 1: - message.businessStatus = 1; - break; - case "CLOSED_TEMPORARILY": - case 2: - message.businessStatus = 2; - break; - case "CLOSED_PERMANENTLY": - case 3: - message.businessStatus = 3; - break; - } - switch (object.priceLevel) { - default: - if (typeof object.priceLevel === "number") { - message.priceLevel = object.priceLevel; - break; - } - break; - case "PRICE_LEVEL_UNSPECIFIED": - case 0: - message.priceLevel = 0; - break; - case "PRICE_LEVEL_FREE": - case 1: - message.priceLevel = 1; - break; - case "PRICE_LEVEL_INEXPENSIVE": - case 2: - message.priceLevel = 2; - break; - case "PRICE_LEVEL_MODERATE": - case 3: - message.priceLevel = 3; - break; - case "PRICE_LEVEL_EXPENSIVE": - case 4: - message.priceLevel = 4; - break; - case "PRICE_LEVEL_VERY_EXPENSIVE": - case 5: - message.priceLevel = 5; - break; - } - if (object.attributions) { - if (!Array.isArray(object.attributions)) - throw TypeError(".google.maps.places.v1.Place.attributions: array expected"); - message.attributions = []; - for (var i = 0; i < object.attributions.length; ++i) { - if (typeof object.attributions[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.attributions: object expected"); - message.attributions[i] = $root.google.maps.places.v1.Place.Attribution.fromObject(object.attributions[i]); - } - } - if (object.userRatingCount != null) - message.userRatingCount = object.userRatingCount | 0; - if (object.iconMaskBaseUri != null) - message.iconMaskBaseUri = String(object.iconMaskBaseUri); - if (object.iconBackgroundColor != null) - message.iconBackgroundColor = String(object.iconBackgroundColor); - if (object.takeout != null) - message.takeout = Boolean(object.takeout); - if (object.delivery != null) - message.delivery = Boolean(object.delivery); - if (object.dineIn != null) - message.dineIn = Boolean(object.dineIn); - if (object.curbsidePickup != null) - message.curbsidePickup = Boolean(object.curbsidePickup); - if (object.reservable != null) - message.reservable = Boolean(object.reservable); - if (object.servesBreakfast != null) - message.servesBreakfast = Boolean(object.servesBreakfast); - if (object.servesLunch != null) - message.servesLunch = Boolean(object.servesLunch); - if (object.servesDinner != null) - message.servesDinner = Boolean(object.servesDinner); - if (object.servesBeer != null) - message.servesBeer = Boolean(object.servesBeer); - if (object.servesWine != null) - message.servesWine = Boolean(object.servesWine); - if (object.servesBrunch != null) - message.servesBrunch = Boolean(object.servesBrunch); - if (object.servesVegetarianFood != null) - message.servesVegetarianFood = Boolean(object.servesVegetarianFood); - if (object.currentOpeningHours != null) { - if (typeof object.currentOpeningHours !== "object") - throw TypeError(".google.maps.places.v1.Place.currentOpeningHours: object expected"); - message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentOpeningHours); - } - if (object.currentSecondaryOpeningHours) { - if (!Array.isArray(object.currentSecondaryOpeningHours)) - throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: array expected"); - message.currentSecondaryOpeningHours = []; - for (var i = 0; i < object.currentSecondaryOpeningHours.length; ++i) { - if (typeof object.currentSecondaryOpeningHours[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: object expected"); - message.currentSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentSecondaryOpeningHours[i]); - } - } - if (object.regularSecondaryOpeningHours) { - if (!Array.isArray(object.regularSecondaryOpeningHours)) - throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: array expected"); - message.regularSecondaryOpeningHours = []; - for (var i = 0; i < object.regularSecondaryOpeningHours.length; ++i) { - if (typeof object.regularSecondaryOpeningHours[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: object expected"); - message.regularSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularSecondaryOpeningHours[i]); - } - } - if (object.editorialSummary != null) { - if (typeof object.editorialSummary !== "object") - throw TypeError(".google.maps.places.v1.Place.editorialSummary: object expected"); - message.editorialSummary = $root.google.type.LocalizedText.fromObject(object.editorialSummary); - } - if (object.outdoorSeating != null) - message.outdoorSeating = Boolean(object.outdoorSeating); - if (object.liveMusic != null) - message.liveMusic = Boolean(object.liveMusic); - if (object.menuForChildren != null) - message.menuForChildren = Boolean(object.menuForChildren); - if (object.servesCocktails != null) - message.servesCocktails = Boolean(object.servesCocktails); - if (object.servesDessert != null) - message.servesDessert = Boolean(object.servesDessert); - if (object.servesCoffee != null) - message.servesCoffee = Boolean(object.servesCoffee); - if (object.goodForChildren != null) - message.goodForChildren = Boolean(object.goodForChildren); - if (object.allowsDogs != null) - message.allowsDogs = Boolean(object.allowsDogs); - if (object.restroom != null) - message.restroom = Boolean(object.restroom); - if (object.goodForGroups != null) - message.goodForGroups = Boolean(object.goodForGroups); - if (object.goodForWatchingSports != null) - message.goodForWatchingSports = Boolean(object.goodForWatchingSports); - if (object.paymentOptions != null) { - if (typeof object.paymentOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.paymentOptions: object expected"); - message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.fromObject(object.paymentOptions); - } - if (object.parkingOptions != null) { - if (typeof object.parkingOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.parkingOptions: object expected"); - message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.fromObject(object.parkingOptions); - } - if (object.subDestinations) { - if (!Array.isArray(object.subDestinations)) - throw TypeError(".google.maps.places.v1.Place.subDestinations: array expected"); - message.subDestinations = []; - for (var i = 0; i < object.subDestinations.length; ++i) { - if (typeof object.subDestinations[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.subDestinations: object expected"); - message.subDestinations[i] = $root.google.maps.places.v1.Place.SubDestination.fromObject(object.subDestinations[i]); - } - } - if (object.accessibilityOptions != null) { - if (typeof object.accessibilityOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.accessibilityOptions: object expected"); - message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.fromObject(object.accessibilityOptions); - } - if (object.fuelOptions != null) { - if (typeof object.fuelOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.fuelOptions: object expected"); - message.fuelOptions = $root.google.maps.places.v1.FuelOptions.fromObject(object.fuelOptions); - } - if (object.evChargeOptions != null) { - if (typeof object.evChargeOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.evChargeOptions: object expected"); - message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.fromObject(object.evChargeOptions); - } - if (object.generativeSummary != null) { - if (typeof object.generativeSummary !== "object") - throw TypeError(".google.maps.places.v1.Place.generativeSummary: object expected"); - message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.fromObject(object.generativeSummary); - } - if (object.areaSummary != null) { - if (typeof object.areaSummary !== "object") - throw TypeError(".google.maps.places.v1.Place.areaSummary: object expected"); - message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.fromObject(object.areaSummary); - } - return message; - }; - - /** - * Creates a plain object from a Place message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place - * @static - * @param {google.maps.places.v1.Place} message Place - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Place.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.types = []; - object.addressComponents = []; - object.attributions = []; - object.currentSecondaryOpeningHours = []; - object.regularSecondaryOpeningHours = []; - object.reviews = []; - object.photos = []; - object.subDestinations = []; - } - if (options.defaults) { - object.name = ""; - object.id = ""; - object.nationalPhoneNumber = ""; - object.internationalPhoneNumber = ""; - object.formattedAddress = ""; - object.plusCode = null; - object.location = null; - object.viewport = null; - object.rating = 0; - object.googleMapsUri = ""; - object.websiteUri = ""; - object.regularOpeningHours = null; - object.adrFormatAddress = ""; - object.businessStatus = options.enums === String ? "BUSINESS_STATUS_UNSPECIFIED" : 0; - object.priceLevel = options.enums === String ? "PRICE_LEVEL_UNSPECIFIED" : 0; - object.iconMaskBaseUri = ""; - object.iconBackgroundColor = ""; - object.displayName = null; - object.primaryTypeDisplayName = null; - object.currentOpeningHours = null; - object.primaryType = ""; - object.shortFormattedAddress = ""; - object.editorialSummary = null; - object.paymentOptions = null; - object.parkingOptions = null; - object.fuelOptions = null; - object.evChargeOptions = null; - object.generativeSummary = null; - object.areaSummary = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) - object.nationalPhoneNumber = message.nationalPhoneNumber; - if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) - object.internationalPhoneNumber = message.internationalPhoneNumber; - if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) - object.formattedAddress = message.formattedAddress; - if (message.addressComponents && message.addressComponents.length) { - object.addressComponents = []; - for (var j = 0; j < message.addressComponents.length; ++j) - object.addressComponents[j] = $root.google.maps.places.v1.Place.AddressComponent.toObject(message.addressComponents[j], options); - } - if (message.plusCode != null && message.hasOwnProperty("plusCode")) - object.plusCode = $root.google.maps.places.v1.Place.PlusCode.toObject(message.plusCode, options); - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.type.LatLng.toObject(message.location, options); - if (message.viewport != null && message.hasOwnProperty("viewport")) - object.viewport = $root.google.geo.type.Viewport.toObject(message.viewport, options); - if (message.rating != null && message.hasOwnProperty("rating")) - object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; - if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) - object.googleMapsUri = message.googleMapsUri; - if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) - object.websiteUri = message.websiteUri; - if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) - object.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularOpeningHours, options); - if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { - object.utcOffsetMinutes = message.utcOffsetMinutes; - if (options.oneofs) - object._utcOffsetMinutes = "utcOffsetMinutes"; - } - if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) - object.adrFormatAddress = message.adrFormatAddress; - if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) - object.businessStatus = options.enums === String ? $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] === undefined ? message.businessStatus : $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] : message.businessStatus; - if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) - object.priceLevel = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevel] === undefined ? message.priceLevel : $root.google.maps.places.v1.PriceLevel[message.priceLevel] : message.priceLevel; - if (message.attributions && message.attributions.length) { - object.attributions = []; - for (var j = 0; j < message.attributions.length; ++j) - object.attributions[j] = $root.google.maps.places.v1.Place.Attribution.toObject(message.attributions[j], options); - } - if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { - object.userRatingCount = message.userRatingCount; - if (options.oneofs) - object._userRatingCount = "userRatingCount"; - } - if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) - object.iconMaskBaseUri = message.iconMaskBaseUri; - if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) - object.iconBackgroundColor = message.iconBackgroundColor; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = $root.google.type.LocalizedText.toObject(message.displayName, options); - if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) - object.primaryTypeDisplayName = $root.google.type.LocalizedText.toObject(message.primaryTypeDisplayName, options); - if (message.takeout != null && message.hasOwnProperty("takeout")) { - object.takeout = message.takeout; - if (options.oneofs) - object._takeout = "takeout"; - } - if (message.delivery != null && message.hasOwnProperty("delivery")) { - object.delivery = message.delivery; - if (options.oneofs) - object._delivery = "delivery"; - } - if (message.dineIn != null && message.hasOwnProperty("dineIn")) { - object.dineIn = message.dineIn; - if (options.oneofs) - object._dineIn = "dineIn"; - } - if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { - object.curbsidePickup = message.curbsidePickup; - if (options.oneofs) - object._curbsidePickup = "curbsidePickup"; - } - if (message.reservable != null && message.hasOwnProperty("reservable")) { - object.reservable = message.reservable; - if (options.oneofs) - object._reservable = "reservable"; - } - if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { - object.servesBreakfast = message.servesBreakfast; - if (options.oneofs) - object._servesBreakfast = "servesBreakfast"; - } - if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { - object.servesLunch = message.servesLunch; - if (options.oneofs) - object._servesLunch = "servesLunch"; - } - if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { - object.servesDinner = message.servesDinner; - if (options.oneofs) - object._servesDinner = "servesDinner"; - } - if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { - object.servesBeer = message.servesBeer; - if (options.oneofs) - object._servesBeer = "servesBeer"; - } - if (message.servesWine != null && message.hasOwnProperty("servesWine")) { - object.servesWine = message.servesWine; - if (options.oneofs) - object._servesWine = "servesWine"; - } - if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { - object.servesBrunch = message.servesBrunch; - if (options.oneofs) - object._servesBrunch = "servesBrunch"; - } - if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { - object.servesVegetarianFood = message.servesVegetarianFood; - if (options.oneofs) - object._servesVegetarianFood = "servesVegetarianFood"; - } - if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) - object.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentOpeningHours, options); - if (message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length) { - object.currentSecondaryOpeningHours = []; - for (var j = 0; j < message.currentSecondaryOpeningHours.length; ++j) - object.currentSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentSecondaryOpeningHours[j], options); - } - if (message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length) { - object.regularSecondaryOpeningHours = []; - for (var j = 0; j < message.regularSecondaryOpeningHours.length; ++j) - object.regularSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularSecondaryOpeningHours[j], options); - } - if (message.primaryType != null && message.hasOwnProperty("primaryType")) - object.primaryType = message.primaryType; - if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) - object.shortFormattedAddress = message.shortFormattedAddress; - if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) - object.editorialSummary = $root.google.type.LocalizedText.toObject(message.editorialSummary, options); - if (message.reviews && message.reviews.length) { - object.reviews = []; - for (var j = 0; j < message.reviews.length; ++j) - object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); - } - if (message.photos && message.photos.length) { - object.photos = []; - for (var j = 0; j < message.photos.length; ++j) - object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); - } - if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { - object.outdoorSeating = message.outdoorSeating; - if (options.oneofs) - object._outdoorSeating = "outdoorSeating"; - } - if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { - object.liveMusic = message.liveMusic; - if (options.oneofs) - object._liveMusic = "liveMusic"; - } - if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { - object.menuForChildren = message.menuForChildren; - if (options.oneofs) - object._menuForChildren = "menuForChildren"; - } - if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { - object.servesCocktails = message.servesCocktails; - if (options.oneofs) - object._servesCocktails = "servesCocktails"; - } - if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { - object.servesDessert = message.servesDessert; - if (options.oneofs) - object._servesDessert = "servesDessert"; - } - if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { - object.servesCoffee = message.servesCoffee; - if (options.oneofs) - object._servesCoffee = "servesCoffee"; - } - if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { - object.goodForChildren = message.goodForChildren; - if (options.oneofs) - object._goodForChildren = "goodForChildren"; - } - if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { - object.allowsDogs = message.allowsDogs; - if (options.oneofs) - object._allowsDogs = "allowsDogs"; - } - if (message.restroom != null && message.hasOwnProperty("restroom")) { - object.restroom = message.restroom; - if (options.oneofs) - object._restroom = "restroom"; - } - if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { - object.goodForGroups = message.goodForGroups; - if (options.oneofs) - object._goodForGroups = "goodForGroups"; - } - if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { - object.goodForWatchingSports = message.goodForWatchingSports; - if (options.oneofs) - object._goodForWatchingSports = "goodForWatchingSports"; - } - if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) - object.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.toObject(message.paymentOptions, options); - if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) - object.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.toObject(message.parkingOptions, options); - if (message.subDestinations && message.subDestinations.length) { - object.subDestinations = []; - for (var j = 0; j < message.subDestinations.length; ++j) - object.subDestinations[j] = $root.google.maps.places.v1.Place.SubDestination.toObject(message.subDestinations[j], options); - } - if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { - object.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.toObject(message.accessibilityOptions, options); - if (options.oneofs) - object._accessibilityOptions = "accessibilityOptions"; - } - if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) - object.fuelOptions = $root.google.maps.places.v1.FuelOptions.toObject(message.fuelOptions, options); - if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) - object.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.toObject(message.evChargeOptions, options); - if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) - object.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.toObject(message.generativeSummary, options); - if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) - object.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.toObject(message.areaSummary, options); - return object; - }; - - /** - * Converts this Place to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place - * @instance - * @returns {Object.} JSON object - */ - Place.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Place - * @function getTypeUrl - * @memberof google.maps.places.v1.Place - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place"; - }; - - Place.AddressComponent = (function() { - - /** - * Properties of an AddressComponent. - * @memberof google.maps.places.v1.Place - * @interface IAddressComponent - * @property {string|null} [longText] AddressComponent longText - * @property {string|null} [shortText] AddressComponent shortText - * @property {Array.|null} [types] AddressComponent types - * @property {string|null} [languageCode] AddressComponent languageCode - */ - - /** - * Constructs a new AddressComponent. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an AddressComponent. - * @implements IAddressComponent - * @constructor - * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set - */ - function AddressComponent(properties) { - this.types = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AddressComponent longText. - * @member {string} longText - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.longText = ""; - - /** - * AddressComponent shortText. - * @member {string} shortText - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.shortText = ""; - - /** - * AddressComponent types. - * @member {Array.} types - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.types = $util.emptyArray; - - /** - * AddressComponent languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.languageCode = ""; - - /** - * Creates a new AddressComponent instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent instance - */ - AddressComponent.create = function create(properties) { - return new AddressComponent(properties); - }; - - /** - * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddressComponent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.longText != null && Object.hasOwnProperty.call(message, "longText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.longText); - if (message.shortText != null && Object.hasOwnProperty.call(message, "shortText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortText); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.types[i]); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - return writer; - }; - - /** - * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddressComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddressComponent message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddressComponent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AddressComponent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.longText = reader.string(); - break; - } - case 2: { - message.shortText = reader.string(); - break; - } - case 3: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 4: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddressComponent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddressComponent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddressComponent message. - * @function verify - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddressComponent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.longText != null && message.hasOwnProperty("longText")) - if (!$util.isString(message.longText)) - return "longText: string expected"; - if (message.shortText != null && message.hasOwnProperty("shortText")) - if (!$util.isString(message.shortText)) - return "shortText: string expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - */ - AddressComponent.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.AddressComponent) - return object; - var message = new $root.google.maps.places.v1.Place.AddressComponent(); - if (object.longText != null) - message.longText = String(object.longText); - if (object.shortText != null) - message.shortText = String(object.shortText); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.Place.AddressComponent.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.AddressComponent} message AddressComponent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddressComponent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) { - object.longText = ""; - object.shortText = ""; - object.languageCode = ""; - } - if (message.longText != null && message.hasOwnProperty("longText")) - object.longText = message.longText; - if (message.shortText != null && message.hasOwnProperty("shortText")) - object.shortText = message.shortText; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; - - /** - * Converts this AddressComponent to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - * @returns {Object.} JSON object - */ - AddressComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddressComponent - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.AddressComponent"; - }; - - return AddressComponent; - })(); - - Place.PlusCode = (function() { - - /** - * Properties of a PlusCode. - * @memberof google.maps.places.v1.Place - * @interface IPlusCode - * @property {string|null} [globalCode] PlusCode globalCode - * @property {string|null} [compoundCode] PlusCode compoundCode - */ - - /** - * Constructs a new PlusCode. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a PlusCode. - * @implements IPlusCode - * @constructor - * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set - */ - function PlusCode(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlusCode globalCode. - * @member {string} globalCode - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - */ - PlusCode.prototype.globalCode = ""; - - /** - * PlusCode compoundCode. - * @member {string} compoundCode - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - */ - PlusCode.prototype.compoundCode = ""; - - /** - * Creates a new PlusCode instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode instance - */ - PlusCode.create = function create(properties) { - return new PlusCode(properties); - }; - - /** - * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlusCode.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode); - if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode); - return writer; - }; - - /** - * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlusCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlusCode message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlusCode.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PlusCode(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.globalCode = reader.string(); - break; - } - case 2: { - message.compoundCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlusCode message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlusCode.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlusCode message. - * @function verify - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlusCode.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.globalCode != null && message.hasOwnProperty("globalCode")) - if (!$util.isString(message.globalCode)) - return "globalCode: string expected"; - if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) - if (!$util.isString(message.compoundCode)) - return "compoundCode: string expected"; - return null; - }; - - /** - * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - */ - PlusCode.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.PlusCode) - return object; - var message = new $root.google.maps.places.v1.Place.PlusCode(); - if (object.globalCode != null) - message.globalCode = String(object.globalCode); - if (object.compoundCode != null) - message.compoundCode = String(object.compoundCode); - return message; - }; - - /** - * Creates a plain object from a PlusCode message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.PlusCode} message PlusCode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlusCode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.globalCode = ""; - object.compoundCode = ""; - } - if (message.globalCode != null && message.hasOwnProperty("globalCode")) - object.globalCode = message.globalCode; - if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) - object.compoundCode = message.compoundCode; - return object; - }; - - /** - * Converts this PlusCode to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - * @returns {Object.} JSON object - */ - PlusCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlusCode - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.PlusCode"; - }; - - return PlusCode; - })(); - - Place.OpeningHours = (function() { - - /** - * Properties of an OpeningHours. - * @memberof google.maps.places.v1.Place - * @interface IOpeningHours - * @property {boolean|null} [openNow] OpeningHours openNow - * @property {Array.|null} [periods] OpeningHours periods - * @property {Array.|null} [weekdayDescriptions] OpeningHours weekdayDescriptions - * @property {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null} [secondaryHoursType] OpeningHours secondaryHoursType - * @property {Array.|null} [specialDays] OpeningHours specialDays - */ - - /** - * Constructs a new OpeningHours. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an OpeningHours. - * @implements IOpeningHours - * @constructor - * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set - */ - function OpeningHours(properties) { - this.periods = []; - this.weekdayDescriptions = []; - this.specialDays = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OpeningHours openNow. - * @member {boolean|null|undefined} openNow - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.openNow = null; - - /** - * OpeningHours periods. - * @member {Array.} periods - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.periods = $util.emptyArray; - - /** - * OpeningHours weekdayDescriptions. - * @member {Array.} weekdayDescriptions - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.weekdayDescriptions = $util.emptyArray; - - /** - * OpeningHours secondaryHoursType. - * @member {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType} secondaryHoursType - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.secondaryHoursType = 0; - - /** - * OpeningHours specialDays. - * @member {Array.} specialDays - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.specialDays = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OpeningHours _openNow. - * @member {"openNow"|undefined} _openNow - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - Object.defineProperty(OpeningHours.prototype, "_openNow", { - get: $util.oneOfGetter($oneOfFields = ["openNow"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OpeningHours instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours instance - */ - OpeningHours.create = function create(properties) { - return new OpeningHours(properties); - }; - - /** - * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpeningHours.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.openNow); - if (message.periods != null && message.periods.length) - for (var i = 0; i < message.periods.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.Period.encode(message.periods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.weekdayDescriptions != null && message.weekdayDescriptions.length) - for (var i = 0; i < message.weekdayDescriptions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.weekdayDescriptions[i]); - if (message.secondaryHoursType != null && Object.hasOwnProperty.call(message, "secondaryHoursType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secondaryHoursType); - if (message.specialDays != null && message.specialDays.length) - for (var i = 0; i < message.specialDays.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.encode(message.specialDays[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpeningHours.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OpeningHours message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpeningHours.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.openNow = reader.bool(); - break; - } - case 2: { - if (!(message.periods && message.periods.length)) - message.periods = []; - message.periods.push($root.google.maps.places.v1.Place.OpeningHours.Period.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.weekdayDescriptions && message.weekdayDescriptions.length)) - message.weekdayDescriptions = []; - message.weekdayDescriptions.push(reader.string()); - break; - } - case 4: { - message.secondaryHoursType = reader.int32(); - break; - } - case 5: { - if (!(message.specialDays && message.specialDays.length)) - message.specialDays = []; - message.specialDays.push($root.google.maps.places.v1.Place.OpeningHours.SpecialDay.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OpeningHours message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpeningHours.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OpeningHours message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OpeningHours.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.openNow != null && message.hasOwnProperty("openNow")) { - properties._openNow = 1; - if (typeof message.openNow !== "boolean") - return "openNow: boolean expected"; - } - if (message.periods != null && message.hasOwnProperty("periods")) { - if (!Array.isArray(message.periods)) - return "periods: array expected"; - for (var i = 0; i < message.periods.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.verify(message.periods[i]); - if (error) - return "periods." + error; - } - } - if (message.weekdayDescriptions != null && message.hasOwnProperty("weekdayDescriptions")) { - if (!Array.isArray(message.weekdayDescriptions)) - return "weekdayDescriptions: array expected"; - for (var i = 0; i < message.weekdayDescriptions.length; ++i) - if (!$util.isString(message.weekdayDescriptions[i])) - return "weekdayDescriptions: string[] expected"; - } - if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) - switch (message.secondaryHoursType) { - default: - return "secondaryHoursType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.specialDays != null && message.hasOwnProperty("specialDays")) { - if (!Array.isArray(message.specialDays)) - return "specialDays: array expected"; - for (var i = 0; i < message.specialDays.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.verify(message.specialDays[i]); - if (error) - return "specialDays." + error; - } - } - return null; - }; - - /** - * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - */ - OpeningHours.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours(); - if (object.openNow != null) - message.openNow = Boolean(object.openNow); - if (object.periods) { - if (!Array.isArray(object.periods)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: array expected"); - message.periods = []; - for (var i = 0; i < object.periods.length; ++i) { - if (typeof object.periods[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: object expected"); - message.periods[i] = $root.google.maps.places.v1.Place.OpeningHours.Period.fromObject(object.periods[i]); - } - } - if (object.weekdayDescriptions) { - if (!Array.isArray(object.weekdayDescriptions)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.weekdayDescriptions: array expected"); - message.weekdayDescriptions = []; - for (var i = 0; i < object.weekdayDescriptions.length; ++i) - message.weekdayDescriptions[i] = String(object.weekdayDescriptions[i]); - } - switch (object.secondaryHoursType) { - default: - if (typeof object.secondaryHoursType === "number") { - message.secondaryHoursType = object.secondaryHoursType; - break; - } - break; - case "SECONDARY_HOURS_TYPE_UNSPECIFIED": - case 0: - message.secondaryHoursType = 0; - break; - case "DRIVE_THROUGH": - case 1: - message.secondaryHoursType = 1; - break; - case "HAPPY_HOUR": - case 2: - message.secondaryHoursType = 2; - break; - case "DELIVERY": - case 3: - message.secondaryHoursType = 3; - break; - case "TAKEOUT": - case 4: - message.secondaryHoursType = 4; - break; - case "KITCHEN": - case 5: - message.secondaryHoursType = 5; - break; - case "BREAKFAST": - case 6: - message.secondaryHoursType = 6; - break; - case "LUNCH": - case 7: - message.secondaryHoursType = 7; - break; - case "DINNER": - case 8: - message.secondaryHoursType = 8; - break; - case "BRUNCH": - case 9: - message.secondaryHoursType = 9; - break; - case "PICKUP": - case 10: - message.secondaryHoursType = 10; - break; - case "ACCESS": - case 11: - message.secondaryHoursType = 11; - break; - case "SENIOR_HOURS": - case 12: - message.secondaryHoursType = 12; - break; - case "ONLINE_SERVICE_HOURS": - case 13: - message.secondaryHoursType = 13; - break; - } - if (object.specialDays) { - if (!Array.isArray(object.specialDays)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: array expected"); - message.specialDays = []; - for (var i = 0; i < object.specialDays.length; ++i) { - if (typeof object.specialDays[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: object expected"); - message.specialDays[i] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.fromObject(object.specialDays[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.OpeningHours} message OpeningHours - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OpeningHours.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.periods = []; - object.weekdayDescriptions = []; - object.specialDays = []; - } - if (options.defaults) - object.secondaryHoursType = options.enums === String ? "SECONDARY_HOURS_TYPE_UNSPECIFIED" : 0; - if (message.openNow != null && message.hasOwnProperty("openNow")) { - object.openNow = message.openNow; - if (options.oneofs) - object._openNow = "openNow"; - } - if (message.periods && message.periods.length) { - object.periods = []; - for (var j = 0; j < message.periods.length; ++j) - object.periods[j] = $root.google.maps.places.v1.Place.OpeningHours.Period.toObject(message.periods[j], options); - } - if (message.weekdayDescriptions && message.weekdayDescriptions.length) { - object.weekdayDescriptions = []; - for (var j = 0; j < message.weekdayDescriptions.length; ++j) - object.weekdayDescriptions[j] = message.weekdayDescriptions[j]; - } - if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) - object.secondaryHoursType = options.enums === String ? $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] === undefined ? message.secondaryHoursType : $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] : message.secondaryHoursType; - if (message.specialDays && message.specialDays.length) { - object.specialDays = []; - for (var j = 0; j < message.specialDays.length; ++j) - object.specialDays[j] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.toObject(message.specialDays[j], options); - } - return object; - }; - - /** - * Converts this OpeningHours to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - * @returns {Object.} JSON object - */ - OpeningHours.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OpeningHours - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OpeningHours.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours"; - }; - - OpeningHours.Period = (function() { - - /** - * Properties of a Period. - * @memberof google.maps.places.v1.Place.OpeningHours - * @interface IPeriod - * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [open] Period open - * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [close] Period close - */ - - /** - * Constructs a new Period. - * @memberof google.maps.places.v1.Place.OpeningHours - * @classdesc Represents a Period. - * @implements IPeriod - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set - */ - function Period(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Period open. - * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} open - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - */ - Period.prototype.open = null; - - /** - * Period close. - * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} close - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - */ - Period.prototype.close = null; - - /** - * Creates a new Period instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period instance - */ - Period.create = function create(properties) { - return new Period(properties); - }; - - /** - * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.open != null && Object.hasOwnProperty.call(message, "open")) - $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.open, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.close != null && Object.hasOwnProperty.call(message, "close")) - $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.close, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Period message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); - break; - } - case 2: { - message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Period message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Period.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.open != null && message.hasOwnProperty("open")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.open); - if (error) - return "open." + error; - } - if (message.close != null && message.hasOwnProperty("close")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.close); - if (error) - return "close." + error; - } - return null; - }; - - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - */ - Period.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); - if (object.open != null) { - if (typeof object.open !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.open: object expected"); - message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.open); - } - if (object.close != null) { - if (typeof object.close !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.close: object expected"); - message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.close); - } - return message; - }; - - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period} message Period - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Period.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.open = null; - object.close = null; - } - if (message.open != null && message.hasOwnProperty("open")) - object.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.open, options); - if (message.close != null && message.hasOwnProperty("close")) - object.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.close, options); - return object; - }; - - /** - * Converts this Period to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - * @returns {Object.} JSON object - */ - Period.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Period - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Period.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period"; - }; - - Period.Point = (function() { - - /** - * Properties of a Point. - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @interface IPoint - * @property {number|null} [day] Point day - * @property {number|null} [hour] Point hour - * @property {number|null} [minute] Point minute - * @property {google.type.IDate|null} [date] Point date - * @property {boolean|null} [truncated] Point truncated - */ - - /** - * Constructs a new Point. - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @classdesc Represents a Point. - * @implements IPoint - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set - */ - function Point(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Point day. - * @member {number|null|undefined} day - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.day = null; - - /** - * Point hour. - * @member {number|null|undefined} hour - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.hour = null; - - /** - * Point minute. - * @member {number|null|undefined} minute - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.minute = null; - - /** - * Point date. - * @member {google.type.IDate|null|undefined} date - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.date = null; - - /** - * Point truncated. - * @member {boolean} truncated - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.truncated = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Point _day. - * @member {"day"|undefined} _day - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_day", { - get: $util.oneOfGetter($oneOfFields = ["day"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Point _hour. - * @member {"hour"|undefined} _hour - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_hour", { - get: $util.oneOfGetter($oneOfFields = ["hour"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Point _minute. - * @member {"minute"|undefined} _minute - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Point instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point instance - */ - Point.create = function create(properties) { - return new Point(properties); - }; - - /** - * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hour); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minute); - if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.truncated); - if (message.date != null && Object.hasOwnProperty.call(message, "date")) - $root.google.type.Date.encode(message.date, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Point message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Point.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.day = reader.int32(); - break; - } - case 2: { - message.hour = reader.int32(); - break; - } - case 3: { - message.minute = reader.int32(); - break; - } - case 6: { - message.date = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 5: { - message.truncated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Point.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Point message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Point.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.day != null && message.hasOwnProperty("day")) { - properties._day = 1; - if (!$util.isInteger(message.day)) - return "day: integer expected"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - properties._hour = 1; - if (!$util.isInteger(message.hour)) - return "hour: integer expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (!$util.isInteger(message.minute)) - return "minute: integer expected"; - } - if (message.date != null && message.hasOwnProperty("date")) { - var error = $root.google.type.Date.verify(message.date); - if (error) - return "date." + error; - } - if (message.truncated != null && message.hasOwnProperty("truncated")) - if (typeof message.truncated !== "boolean") - return "truncated: boolean expected"; - return null; - }; - - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - */ - Point.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period.Point) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); - if (object.day != null) - message.day = object.day | 0; - if (object.hour != null) - message.hour = object.hour | 0; - if (object.minute != null) - message.minute = object.minute | 0; - if (object.date != null) { - if (typeof object.date !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.Point.date: object expected"); - message.date = $root.google.type.Date.fromObject(object.date); - } - if (object.truncated != null) - message.truncated = Boolean(object.truncated); - return message; - }; - - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.Point} message Point - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Point.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.truncated = false; - object.date = null; - } - if (message.day != null && message.hasOwnProperty("day")) { - object.day = message.day; - if (options.oneofs) - object._day = "day"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - object.hour = message.hour; - if (options.oneofs) - object._hour = "hour"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = message.minute; - if (options.oneofs) - object._minute = "minute"; - } - if (message.truncated != null && message.hasOwnProperty("truncated")) - object.truncated = message.truncated; - if (message.date != null && message.hasOwnProperty("date")) - object.date = $root.google.type.Date.toObject(message.date, options); - return object; - }; - - /** - * Converts this Point to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - * @returns {Object.} JSON object - */ - Point.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Point - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period.Point"; - }; - - return Point; - })(); - - return Period; - })(); - - /** - * SecondaryHoursType enum. - * @name google.maps.places.v1.Place.OpeningHours.SecondaryHoursType - * @enum {number} - * @property {number} SECONDARY_HOURS_TYPE_UNSPECIFIED=0 SECONDARY_HOURS_TYPE_UNSPECIFIED value - * @property {number} DRIVE_THROUGH=1 DRIVE_THROUGH value - * @property {number} HAPPY_HOUR=2 HAPPY_HOUR value - * @property {number} DELIVERY=3 DELIVERY value - * @property {number} TAKEOUT=4 TAKEOUT value - * @property {number} KITCHEN=5 KITCHEN value - * @property {number} BREAKFAST=6 BREAKFAST value - * @property {number} LUNCH=7 LUNCH value - * @property {number} DINNER=8 DINNER value - * @property {number} BRUNCH=9 BRUNCH value - * @property {number} PICKUP=10 PICKUP value - * @property {number} ACCESS=11 ACCESS value - * @property {number} SENIOR_HOURS=12 SENIOR_HOURS value - * @property {number} ONLINE_SERVICE_HOURS=13 ONLINE_SERVICE_HOURS value - */ - OpeningHours.SecondaryHoursType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SECONDARY_HOURS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRIVE_THROUGH"] = 1; - values[valuesById[2] = "HAPPY_HOUR"] = 2; - values[valuesById[3] = "DELIVERY"] = 3; - values[valuesById[4] = "TAKEOUT"] = 4; - values[valuesById[5] = "KITCHEN"] = 5; - values[valuesById[6] = "BREAKFAST"] = 6; - values[valuesById[7] = "LUNCH"] = 7; - values[valuesById[8] = "DINNER"] = 8; - values[valuesById[9] = "BRUNCH"] = 9; - values[valuesById[10] = "PICKUP"] = 10; - values[valuesById[11] = "ACCESS"] = 11; - values[valuesById[12] = "SENIOR_HOURS"] = 12; - values[valuesById[13] = "ONLINE_SERVICE_HOURS"] = 13; - return values; - })(); - - OpeningHours.SpecialDay = (function() { - - /** - * Properties of a SpecialDay. - * @memberof google.maps.places.v1.Place.OpeningHours - * @interface ISpecialDay - * @property {google.type.IDate|null} [date] SpecialDay date - */ - - /** - * Constructs a new SpecialDay. - * @memberof google.maps.places.v1.Place.OpeningHours - * @classdesc Represents a SpecialDay. - * @implements ISpecialDay - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set - */ - function SpecialDay(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SpecialDay date. - * @member {google.type.IDate|null|undefined} date - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @instance - */ - SpecialDay.prototype.date = null; - - /** - * Creates a new SpecialDay instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay instance - */ - SpecialDay.create = function create(properties) { - return new SpecialDay(properties); - }; - - /** - * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecialDay.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.date != null && Object.hasOwnProperty.call(message, "date")) - $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecialDay.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SpecialDay message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecialDay.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.date = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SpecialDay message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecialDay.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SpecialDay message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SpecialDay.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.date != null && message.hasOwnProperty("date")) { - var error = $root.google.type.Date.verify(message.date); - if (error) - return "date." + error; - } - return null; - }; - - /** - * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - */ - SpecialDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.SpecialDay) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); - if (object.date != null) { - if (typeof object.date !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.SpecialDay.date: object expected"); - message.date = $root.google.type.Date.fromObject(object.date); - } - return message; - }; - - /** - * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.SpecialDay} message SpecialDay - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SpecialDay.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.date = null; - if (message.date != null && message.hasOwnProperty("date")) - object.date = $root.google.type.Date.toObject(message.date, options); - return object; - }; - - /** - * Converts this SpecialDay to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @instance - * @returns {Object.} JSON object - */ - SpecialDay.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SpecialDay - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SpecialDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.SpecialDay"; - }; - - return SpecialDay; - })(); - - return OpeningHours; - })(); - - /** - * BusinessStatus enum. - * @name google.maps.places.v1.Place.BusinessStatus - * @enum {number} - * @property {number} BUSINESS_STATUS_UNSPECIFIED=0 BUSINESS_STATUS_UNSPECIFIED value - * @property {number} OPERATIONAL=1 OPERATIONAL value - * @property {number} CLOSED_TEMPORARILY=2 CLOSED_TEMPORARILY value - * @property {number} CLOSED_PERMANENTLY=3 CLOSED_PERMANENTLY value - */ - Place.BusinessStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BUSINESS_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPERATIONAL"] = 1; - values[valuesById[2] = "CLOSED_TEMPORARILY"] = 2; - values[valuesById[3] = "CLOSED_PERMANENTLY"] = 3; - return values; - })(); - - Place.Attribution = (function() { - - /** - * Properties of an Attribution. - * @memberof google.maps.places.v1.Place - * @interface IAttribution - * @property {string|null} [provider] Attribution provider - * @property {string|null} [providerUri] Attribution providerUri - */ - - /** - * Constructs a new Attribution. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an Attribution. - * @implements IAttribution - * @constructor - * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set - */ - function Attribution(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Attribution provider. - * @member {string} provider - * @memberof google.maps.places.v1.Place.Attribution - * @instance - */ - Attribution.prototype.provider = ""; - - /** - * Attribution providerUri. - * @member {string} providerUri - * @memberof google.maps.places.v1.Place.Attribution - * @instance - */ - Attribution.prototype.providerUri = ""; - - /** - * Creates a new Attribution instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.Attribution} Attribution instance - */ - Attribution.create = function create(properties) { - return new Attribution(properties); - }; - - /** - * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); - if (message.providerUri != null && Object.hasOwnProperty.call(message, "providerUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerUri); - return writer; - }; - - /** - * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Attribution message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.Attribution} Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Attribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.provider = reader.string(); - break; - } - case 2: { - message.providerUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Attribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.Attribution} Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Attribution message. - * @function verify - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Attribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - if (!$util.isString(message.provider)) - return "provider: string expected"; - if (message.providerUri != null && message.hasOwnProperty("providerUri")) - if (!$util.isString(message.providerUri)) - return "providerUri: string expected"; - return null; - }; - - /** - * Creates an Attribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.Attribution} Attribution - */ - Attribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.Attribution) - return object; - var message = new $root.google.maps.places.v1.Place.Attribution(); - if (object.provider != null) - message.provider = String(object.provider); - if (object.providerUri != null) - message.providerUri = String(object.providerUri); - return message; - }; - - /** - * Creates a plain object from an Attribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.Attribution} message Attribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Attribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.provider = ""; - object.providerUri = ""; - } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = message.provider; - if (message.providerUri != null && message.hasOwnProperty("providerUri")) - object.providerUri = message.providerUri; - return object; - }; - - /** - * Converts this Attribution to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.Attribution - * @instance - * @returns {Object.} JSON object - */ - Attribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Attribution - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Attribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.Attribution"; - }; - - return Attribution; - })(); - - Place.PaymentOptions = (function() { - - /** - * Properties of a PaymentOptions. - * @memberof google.maps.places.v1.Place - * @interface IPaymentOptions - * @property {boolean|null} [acceptsCreditCards] PaymentOptions acceptsCreditCards - * @property {boolean|null} [acceptsDebitCards] PaymentOptions acceptsDebitCards - * @property {boolean|null} [acceptsCashOnly] PaymentOptions acceptsCashOnly - * @property {boolean|null} [acceptsNfc] PaymentOptions acceptsNfc - */ - - /** - * Constructs a new PaymentOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a PaymentOptions. - * @implements IPaymentOptions - * @constructor - * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set - */ - function PaymentOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PaymentOptions acceptsCreditCards. - * @member {boolean|null|undefined} acceptsCreditCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsCreditCards = null; - - /** - * PaymentOptions acceptsDebitCards. - * @member {boolean|null|undefined} acceptsDebitCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsDebitCards = null; - - /** - * PaymentOptions acceptsCashOnly. - * @member {boolean|null|undefined} acceptsCashOnly - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsCashOnly = null; - - /** - * PaymentOptions acceptsNfc. - * @member {boolean|null|undefined} acceptsNfc - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsNfc = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PaymentOptions _acceptsCreditCards. - * @member {"acceptsCreditCards"|undefined} _acceptsCreditCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsCreditCards", { - get: $util.oneOfGetter($oneOfFields = ["acceptsCreditCards"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PaymentOptions _acceptsDebitCards. - * @member {"acceptsDebitCards"|undefined} _acceptsDebitCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsDebitCards", { - get: $util.oneOfGetter($oneOfFields = ["acceptsDebitCards"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PaymentOptions _acceptsCashOnly. - * @member {"acceptsCashOnly"|undefined} _acceptsCashOnly - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsCashOnly", { - get: $util.oneOfGetter($oneOfFields = ["acceptsCashOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PaymentOptions _acceptsNfc. - * @member {"acceptsNfc"|undefined} _acceptsNfc - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsNfc", { - get: $util.oneOfGetter($oneOfFields = ["acceptsNfc"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PaymentOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions instance - */ - PaymentOptions.create = function create(properties) { - return new PaymentOptions(properties); - }; - - /** - * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceptsCreditCards != null && Object.hasOwnProperty.call(message, "acceptsCreditCards")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsCreditCards); - if (message.acceptsDebitCards != null && Object.hasOwnProperty.call(message, "acceptsDebitCards")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.acceptsDebitCards); - if (message.acceptsCashOnly != null && Object.hasOwnProperty.call(message, "acceptsCashOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.acceptsCashOnly); - if (message.acceptsNfc != null && Object.hasOwnProperty.call(message, "acceptsNfc")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.acceptsNfc); - return writer; - }; - - /** - * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PaymentOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PaymentOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceptsCreditCards = reader.bool(); - break; - } - case 2: { - message.acceptsDebitCards = reader.bool(); - break; - } - case 3: { - message.acceptsCashOnly = reader.bool(); - break; - } - case 4: { - message.acceptsNfc = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PaymentOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PaymentOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { - properties._acceptsCreditCards = 1; - if (typeof message.acceptsCreditCards !== "boolean") - return "acceptsCreditCards: boolean expected"; - } - if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { - properties._acceptsDebitCards = 1; - if (typeof message.acceptsDebitCards !== "boolean") - return "acceptsDebitCards: boolean expected"; - } - if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { - properties._acceptsCashOnly = 1; - if (typeof message.acceptsCashOnly !== "boolean") - return "acceptsCashOnly: boolean expected"; - } - if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { - properties._acceptsNfc = 1; - if (typeof message.acceptsNfc !== "boolean") - return "acceptsNfc: boolean expected"; - } - return null; - }; - - /** - * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - */ - PaymentOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.PaymentOptions) - return object; - var message = new $root.google.maps.places.v1.Place.PaymentOptions(); - if (object.acceptsCreditCards != null) - message.acceptsCreditCards = Boolean(object.acceptsCreditCards); - if (object.acceptsDebitCards != null) - message.acceptsDebitCards = Boolean(object.acceptsDebitCards); - if (object.acceptsCashOnly != null) - message.acceptsCashOnly = Boolean(object.acceptsCashOnly); - if (object.acceptsNfc != null) - message.acceptsNfc = Boolean(object.acceptsNfc); - return message; - }; - - /** - * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.PaymentOptions} message PaymentOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PaymentOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { - object.acceptsCreditCards = message.acceptsCreditCards; - if (options.oneofs) - object._acceptsCreditCards = "acceptsCreditCards"; - } - if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { - object.acceptsDebitCards = message.acceptsDebitCards; - if (options.oneofs) - object._acceptsDebitCards = "acceptsDebitCards"; - } - if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { - object.acceptsCashOnly = message.acceptsCashOnly; - if (options.oneofs) - object._acceptsCashOnly = "acceptsCashOnly"; - } - if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { - object.acceptsNfc = message.acceptsNfc; - if (options.oneofs) - object._acceptsNfc = "acceptsNfc"; - } - return object; - }; - - /** - * Converts this PaymentOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - * @returns {Object.} JSON object - */ - PaymentOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PaymentOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PaymentOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.PaymentOptions"; - }; - - return PaymentOptions; - })(); - - Place.ParkingOptions = (function() { - - /** - * Properties of a ParkingOptions. - * @memberof google.maps.places.v1.Place - * @interface IParkingOptions - * @property {boolean|null} [freeParkingLot] ParkingOptions freeParkingLot - * @property {boolean|null} [paidParkingLot] ParkingOptions paidParkingLot - * @property {boolean|null} [freeStreetParking] ParkingOptions freeStreetParking - * @property {boolean|null} [paidStreetParking] ParkingOptions paidStreetParking - * @property {boolean|null} [valetParking] ParkingOptions valetParking - * @property {boolean|null} [freeGarageParking] ParkingOptions freeGarageParking - * @property {boolean|null} [paidGarageParking] ParkingOptions paidGarageParking - */ - - /** - * Constructs a new ParkingOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a ParkingOptions. - * @implements IParkingOptions - * @constructor - * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set - */ - function ParkingOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ParkingOptions freeParkingLot. - * @member {boolean|null|undefined} freeParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeParkingLot = null; - - /** - * ParkingOptions paidParkingLot. - * @member {boolean|null|undefined} paidParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidParkingLot = null; - - /** - * ParkingOptions freeStreetParking. - * @member {boolean|null|undefined} freeStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeStreetParking = null; - - /** - * ParkingOptions paidStreetParking. - * @member {boolean|null|undefined} paidStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidStreetParking = null; - - /** - * ParkingOptions valetParking. - * @member {boolean|null|undefined} valetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.valetParking = null; - - /** - * ParkingOptions freeGarageParking. - * @member {boolean|null|undefined} freeGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeGarageParking = null; - - /** - * ParkingOptions paidGarageParking. - * @member {boolean|null|undefined} paidGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidGarageParking = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ParkingOptions _freeParkingLot. - * @member {"freeParkingLot"|undefined} _freeParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeParkingLot", { - get: $util.oneOfGetter($oneOfFields = ["freeParkingLot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _paidParkingLot. - * @member {"paidParkingLot"|undefined} _paidParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidParkingLot", { - get: $util.oneOfGetter($oneOfFields = ["paidParkingLot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _freeStreetParking. - * @member {"freeStreetParking"|undefined} _freeStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeStreetParking", { - get: $util.oneOfGetter($oneOfFields = ["freeStreetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _paidStreetParking. - * @member {"paidStreetParking"|undefined} _paidStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidStreetParking", { - get: $util.oneOfGetter($oneOfFields = ["paidStreetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _valetParking. - * @member {"valetParking"|undefined} _valetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_valetParking", { - get: $util.oneOfGetter($oneOfFields = ["valetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _freeGarageParking. - * @member {"freeGarageParking"|undefined} _freeGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeGarageParking", { - get: $util.oneOfGetter($oneOfFields = ["freeGarageParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ParkingOptions _paidGarageParking. - * @member {"paidGarageParking"|undefined} _paidGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidGarageParking", { - get: $util.oneOfGetter($oneOfFields = ["paidGarageParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ParkingOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions instance - */ - ParkingOptions.create = function create(properties) { - return new ParkingOptions(properties); - }; - - /** - * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParkingOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.freeParkingLot != null && Object.hasOwnProperty.call(message, "freeParkingLot")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.freeParkingLot); - if (message.paidParkingLot != null && Object.hasOwnProperty.call(message, "paidParkingLot")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paidParkingLot); - if (message.freeStreetParking != null && Object.hasOwnProperty.call(message, "freeStreetParking")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.freeStreetParking); - if (message.paidStreetParking != null && Object.hasOwnProperty.call(message, "paidStreetParking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.paidStreetParking); - if (message.valetParking != null && Object.hasOwnProperty.call(message, "valetParking")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.valetParking); - if (message.freeGarageParking != null && Object.hasOwnProperty.call(message, "freeGarageParking")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.freeGarageParking); - if (message.paidGarageParking != null && Object.hasOwnProperty.call(message, "paidGarageParking")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.paidGarageParking); - return writer; - }; - - /** - * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParkingOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParkingOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParkingOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ParkingOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.freeParkingLot = reader.bool(); - break; - } - case 2: { - message.paidParkingLot = reader.bool(); - break; - } - case 3: { - message.freeStreetParking = reader.bool(); - break; - } - case 4: { - message.paidStreetParking = reader.bool(); - break; - } - case 5: { - message.valetParking = reader.bool(); - break; - } - case 6: { - message.freeGarageParking = reader.bool(); - break; - } - case 7: { - message.paidGarageParking = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParkingOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParkingOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParkingOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { - properties._freeParkingLot = 1; - if (typeof message.freeParkingLot !== "boolean") - return "freeParkingLot: boolean expected"; - } - if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { - properties._paidParkingLot = 1; - if (typeof message.paidParkingLot !== "boolean") - return "paidParkingLot: boolean expected"; - } - if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { - properties._freeStreetParking = 1; - if (typeof message.freeStreetParking !== "boolean") - return "freeStreetParking: boolean expected"; - } - if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { - properties._paidStreetParking = 1; - if (typeof message.paidStreetParking !== "boolean") - return "paidStreetParking: boolean expected"; - } - if (message.valetParking != null && message.hasOwnProperty("valetParking")) { - properties._valetParking = 1; - if (typeof message.valetParking !== "boolean") - return "valetParking: boolean expected"; - } - if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { - properties._freeGarageParking = 1; - if (typeof message.freeGarageParking !== "boolean") - return "freeGarageParking: boolean expected"; - } - if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { - properties._paidGarageParking = 1; - if (typeof message.paidGarageParking !== "boolean") - return "paidGarageParking: boolean expected"; - } - return null; - }; - - /** - * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - */ - ParkingOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.ParkingOptions) - return object; - var message = new $root.google.maps.places.v1.Place.ParkingOptions(); - if (object.freeParkingLot != null) - message.freeParkingLot = Boolean(object.freeParkingLot); - if (object.paidParkingLot != null) - message.paidParkingLot = Boolean(object.paidParkingLot); - if (object.freeStreetParking != null) - message.freeStreetParking = Boolean(object.freeStreetParking); - if (object.paidStreetParking != null) - message.paidStreetParking = Boolean(object.paidStreetParking); - if (object.valetParking != null) - message.valetParking = Boolean(object.valetParking); - if (object.freeGarageParking != null) - message.freeGarageParking = Boolean(object.freeGarageParking); - if (object.paidGarageParking != null) - message.paidGarageParking = Boolean(object.paidGarageParking); - return message; - }; - - /** - * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.ParkingOptions} message ParkingOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParkingOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { - object.freeParkingLot = message.freeParkingLot; - if (options.oneofs) - object._freeParkingLot = "freeParkingLot"; - } - if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { - object.paidParkingLot = message.paidParkingLot; - if (options.oneofs) - object._paidParkingLot = "paidParkingLot"; - } - if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { - object.freeStreetParking = message.freeStreetParking; - if (options.oneofs) - object._freeStreetParking = "freeStreetParking"; - } - if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { - object.paidStreetParking = message.paidStreetParking; - if (options.oneofs) - object._paidStreetParking = "paidStreetParking"; - } - if (message.valetParking != null && message.hasOwnProperty("valetParking")) { - object.valetParking = message.valetParking; - if (options.oneofs) - object._valetParking = "valetParking"; - } - if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { - object.freeGarageParking = message.freeGarageParking; - if (options.oneofs) - object._freeGarageParking = "freeGarageParking"; - } - if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { - object.paidGarageParking = message.paidGarageParking; - if (options.oneofs) - object._paidGarageParking = "paidGarageParking"; - } - return object; - }; - - /** - * Converts this ParkingOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - * @returns {Object.} JSON object - */ - ParkingOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ParkingOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParkingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.ParkingOptions"; - }; - - return ParkingOptions; - })(); - - Place.SubDestination = (function() { - - /** - * Properties of a SubDestination. - * @memberof google.maps.places.v1.Place - * @interface ISubDestination - * @property {string|null} [name] SubDestination name - * @property {string|null} [id] SubDestination id - */ - - /** - * Constructs a new SubDestination. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a SubDestination. - * @implements ISubDestination - * @constructor - * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set - */ - function SubDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SubDestination name. - * @member {string} name - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - */ - SubDestination.prototype.name = ""; - - /** - * SubDestination id. - * @member {string} id - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - */ - SubDestination.prototype.id = ""; - - /** - * Creates a new SubDestination instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination instance - */ - SubDestination.create = function create(properties) { - return new SubDestination(properties); - }; - - /** - * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; - - /** - * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SubDestination message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.SubDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.id = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SubDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SubDestination message. - * @function verify - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SubDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; - - /** - * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - */ - SubDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.SubDestination) - return object; - var message = new $root.google.maps.places.v1.Place.SubDestination(); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - return message; - }; - - /** - * Creates a plain object from a SubDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.SubDestination} message SubDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SubDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.id = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; - - /** - * Converts this SubDestination to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - * @returns {Object.} JSON object - */ - SubDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SubDestination - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SubDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.SubDestination"; - }; - - return SubDestination; - })(); - - Place.AccessibilityOptions = (function() { - - /** - * Properties of an AccessibilityOptions. - * @memberof google.maps.places.v1.Place - * @interface IAccessibilityOptions - * @property {boolean|null} [wheelchairAccessibleParking] AccessibilityOptions wheelchairAccessibleParking - * @property {boolean|null} [wheelchairAccessibleEntrance] AccessibilityOptions wheelchairAccessibleEntrance - * @property {boolean|null} [wheelchairAccessibleRestroom] AccessibilityOptions wheelchairAccessibleRestroom - * @property {boolean|null} [wheelchairAccessibleSeating] AccessibilityOptions wheelchairAccessibleSeating - */ - - /** - * Constructs a new AccessibilityOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an AccessibilityOptions. - * @implements IAccessibilityOptions - * @constructor - * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set - */ - function AccessibilityOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AccessibilityOptions wheelchairAccessibleParking. - * @member {boolean|null|undefined} wheelchairAccessibleParking - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleParking = null; - - /** - * AccessibilityOptions wheelchairAccessibleEntrance. - * @member {boolean|null|undefined} wheelchairAccessibleEntrance - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleEntrance = null; - - /** - * AccessibilityOptions wheelchairAccessibleRestroom. - * @member {boolean|null|undefined} wheelchairAccessibleRestroom - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleRestroom = null; - - /** - * AccessibilityOptions wheelchairAccessibleSeating. - * @member {boolean|null|undefined} wheelchairAccessibleSeating - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleSeating = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AccessibilityOptions _wheelchairAccessibleParking. - * @member {"wheelchairAccessibleParking"|undefined} _wheelchairAccessibleParking - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleParking", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleParking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessibilityOptions _wheelchairAccessibleEntrance. - * @member {"wheelchairAccessibleEntrance"|undefined} _wheelchairAccessibleEntrance - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleEntrance", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleEntrance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessibilityOptions _wheelchairAccessibleRestroom. - * @member {"wheelchairAccessibleRestroom"|undefined} _wheelchairAccessibleRestroom - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleRestroom", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleRestroom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessibilityOptions _wheelchairAccessibleSeating. - * @member {"wheelchairAccessibleSeating"|undefined} _wheelchairAccessibleSeating - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleSeating", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleSeating"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AccessibilityOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions instance - */ - AccessibilityOptions.create = function create(properties) { - return new AccessibilityOptions(properties); - }; - - /** - * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessibilityOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.wheelchairAccessibleParking != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleParking")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.wheelchairAccessibleParking); - if (message.wheelchairAccessibleEntrance != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleEntrance")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.wheelchairAccessibleEntrance); - if (message.wheelchairAccessibleRestroom != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleRestroom")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.wheelchairAccessibleRestroom); - if (message.wheelchairAccessibleSeating != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleSeating")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.wheelchairAccessibleSeating); - return writer; - }; - - /** - * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessibilityOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessibilityOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.wheelchairAccessibleParking = reader.bool(); - break; - } - case 2: { - message.wheelchairAccessibleEntrance = reader.bool(); - break; - } - case 3: { - message.wheelchairAccessibleRestroom = reader.bool(); - break; - } - case 4: { - message.wheelchairAccessibleSeating = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessibilityOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AccessibilityOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessibilityOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { - properties._wheelchairAccessibleParking = 1; - if (typeof message.wheelchairAccessibleParking !== "boolean") - return "wheelchairAccessibleParking: boolean expected"; - } - if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { - properties._wheelchairAccessibleEntrance = 1; - if (typeof message.wheelchairAccessibleEntrance !== "boolean") - return "wheelchairAccessibleEntrance: boolean expected"; - } - if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { - properties._wheelchairAccessibleRestroom = 1; - if (typeof message.wheelchairAccessibleRestroom !== "boolean") - return "wheelchairAccessibleRestroom: boolean expected"; - } - if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { - properties._wheelchairAccessibleSeating = 1; - if (typeof message.wheelchairAccessibleSeating !== "boolean") - return "wheelchairAccessibleSeating: boolean expected"; - } - return null; - }; - - /** - * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - */ - AccessibilityOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.AccessibilityOptions) - return object; - var message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); - if (object.wheelchairAccessibleParking != null) - message.wheelchairAccessibleParking = Boolean(object.wheelchairAccessibleParking); - if (object.wheelchairAccessibleEntrance != null) - message.wheelchairAccessibleEntrance = Boolean(object.wheelchairAccessibleEntrance); - if (object.wheelchairAccessibleRestroom != null) - message.wheelchairAccessibleRestroom = Boolean(object.wheelchairAccessibleRestroom); - if (object.wheelchairAccessibleSeating != null) - message.wheelchairAccessibleSeating = Boolean(object.wheelchairAccessibleSeating); - return message; - }; - - /** - * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.AccessibilityOptions} message AccessibilityOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessibilityOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { - object.wheelchairAccessibleParking = message.wheelchairAccessibleParking; - if (options.oneofs) - object._wheelchairAccessibleParking = "wheelchairAccessibleParking"; - } - if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { - object.wheelchairAccessibleEntrance = message.wheelchairAccessibleEntrance; - if (options.oneofs) - object._wheelchairAccessibleEntrance = "wheelchairAccessibleEntrance"; - } - if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { - object.wheelchairAccessibleRestroom = message.wheelchairAccessibleRestroom; - if (options.oneofs) - object._wheelchairAccessibleRestroom = "wheelchairAccessibleRestroom"; - } - if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { - object.wheelchairAccessibleSeating = message.wheelchairAccessibleSeating; - if (options.oneofs) - object._wheelchairAccessibleSeating = "wheelchairAccessibleSeating"; - } - return object; - }; - - /** - * Converts this AccessibilityOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - * @returns {Object.} JSON object - */ - AccessibilityOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessibilityOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessibilityOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.AccessibilityOptions"; - }; - - return AccessibilityOptions; - })(); - - Place.GenerativeSummary = (function() { - - /** - * Properties of a GenerativeSummary. - * @memberof google.maps.places.v1.Place - * @interface IGenerativeSummary - * @property {google.type.ILocalizedText|null} [overview] GenerativeSummary overview - * @property {google.type.ILocalizedText|null} [description] GenerativeSummary description - * @property {google.maps.places.v1.IReferences|null} [references] GenerativeSummary references - */ - - /** - * Constructs a new GenerativeSummary. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a GenerativeSummary. - * @implements IGenerativeSummary - * @constructor - * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set - */ - function GenerativeSummary(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenerativeSummary overview. - * @member {google.type.ILocalizedText|null|undefined} overview - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @instance - */ - GenerativeSummary.prototype.overview = null; - - /** - * GenerativeSummary description. - * @member {google.type.ILocalizedText|null|undefined} description - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @instance - */ - GenerativeSummary.prototype.description = null; - - /** - * GenerativeSummary references. - * @member {google.maps.places.v1.IReferences|null|undefined} references - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @instance - */ - GenerativeSummary.prototype.references = null; - - /** - * Creates a new GenerativeSummary instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary instance - */ - GenerativeSummary.create = function create(properties) { - return new GenerativeSummary(properties); - }; - - /** - * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerativeSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) - $root.google.type.LocalizedText.encode(message.overview, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - $root.google.type.LocalizedText.encode(message.description, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.references != null && Object.hasOwnProperty.call(message, "references")) - $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenerativeSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenerativeSummary message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerativeSummary.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.GenerativeSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.overview = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.description = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 3: { - message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenerativeSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenerativeSummary message. - * @function verify - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenerativeSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.overview != null && message.hasOwnProperty("overview")) { - var error = $root.google.type.LocalizedText.verify(message.overview); - if (error) - return "overview." + error; - } - if (message.description != null && message.hasOwnProperty("description")) { - var error = $root.google.type.LocalizedText.verify(message.description); - if (error) - return "description." + error; - } - if (message.references != null && message.hasOwnProperty("references")) { - var error = $root.google.maps.places.v1.References.verify(message.references); - if (error) - return "references." + error; - } - return null; - }; - - /** - * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary - */ - GenerativeSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.GenerativeSummary) - return object; - var message = new $root.google.maps.places.v1.Place.GenerativeSummary(); - if (object.overview != null) { - if (typeof object.overview !== "object") - throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.overview: object expected"); - message.overview = $root.google.type.LocalizedText.fromObject(object.overview); - } - if (object.description != null) { - if (typeof object.description !== "object") - throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.description: object expected"); - message.description = $root.google.type.LocalizedText.fromObject(object.description); - } - if (object.references != null) { - if (typeof object.references !== "object") - throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.references: object expected"); - message.references = $root.google.maps.places.v1.References.fromObject(object.references); - } - return message; - }; - - /** - * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {google.maps.places.v1.Place.GenerativeSummary} message GenerativeSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenerativeSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.overview = null; - object.description = null; - object.references = null; - } - if (message.overview != null && message.hasOwnProperty("overview")) - object.overview = $root.google.type.LocalizedText.toObject(message.overview, options); - if (message.description != null && message.hasOwnProperty("description")) - object.description = $root.google.type.LocalizedText.toObject(message.description, options); - if (message.references != null && message.hasOwnProperty("references")) - object.references = $root.google.maps.places.v1.References.toObject(message.references, options); - return object; - }; - - /** - * Converts this GenerativeSummary to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @instance - * @returns {Object.} JSON object - */ - GenerativeSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GenerativeSummary - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.GenerativeSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GenerativeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.GenerativeSummary"; - }; - - return GenerativeSummary; - })(); - - Place.AreaSummary = (function() { - - /** - * Properties of an AreaSummary. - * @memberof google.maps.places.v1.Place - * @interface IAreaSummary - * @property {Array.|null} [contentBlocks] AreaSummary contentBlocks - */ - - /** - * Constructs a new AreaSummary. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an AreaSummary. - * @implements IAreaSummary - * @constructor - * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set - */ - function AreaSummary(properties) { - this.contentBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AreaSummary contentBlocks. - * @member {Array.} contentBlocks - * @memberof google.maps.places.v1.Place.AreaSummary - * @instance - */ - AreaSummary.prototype.contentBlocks = $util.emptyArray; - - /** - * Creates a new AreaSummary instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary instance - */ - AreaSummary.create = function create(properties) { - return new AreaSummary(properties); - }; - - /** - * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AreaSummary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contentBlocks != null && message.contentBlocks.length) - for (var i = 0; i < message.contentBlocks.length; ++i) - $root.google.maps.places.v1.ContentBlock.encode(message.contentBlocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AreaSummary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AreaSummary message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AreaSummary.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AreaSummary(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 4: { - if (!(message.contentBlocks && message.contentBlocks.length)) - message.contentBlocks = []; - message.contentBlocks.push($root.google.maps.places.v1.ContentBlock.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AreaSummary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AreaSummary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AreaSummary message. - * @function verify - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AreaSummary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contentBlocks != null && message.hasOwnProperty("contentBlocks")) { - if (!Array.isArray(message.contentBlocks)) - return "contentBlocks: array expected"; - for (var i = 0; i < message.contentBlocks.length; ++i) { - var error = $root.google.maps.places.v1.ContentBlock.verify(message.contentBlocks[i]); - if (error) - return "contentBlocks." + error; - } - } - return null; - }; - - /** - * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary - */ - AreaSummary.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.AreaSummary) - return object; - var message = new $root.google.maps.places.v1.Place.AreaSummary(); - if (object.contentBlocks) { - if (!Array.isArray(object.contentBlocks)) - throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: array expected"); - message.contentBlocks = []; - for (var i = 0; i < object.contentBlocks.length; ++i) { - if (typeof object.contentBlocks[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: object expected"); - message.contentBlocks[i] = $root.google.maps.places.v1.ContentBlock.fromObject(object.contentBlocks[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {google.maps.places.v1.Place.AreaSummary} message AreaSummary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AreaSummary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contentBlocks = []; - if (message.contentBlocks && message.contentBlocks.length) { - object.contentBlocks = []; - for (var j = 0; j < message.contentBlocks.length; ++j) - object.contentBlocks[j] = $root.google.maps.places.v1.ContentBlock.toObject(message.contentBlocks[j], options); - } - return object; - }; - - /** - * Converts this AreaSummary to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.AreaSummary - * @instance - * @returns {Object.} JSON object - */ - AreaSummary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AreaSummary - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.AreaSummary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AreaSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.AreaSummary"; - }; - - return AreaSummary; - })(); - - return Place; - })(); - - /** - * PriceLevel enum. - * @name google.maps.places.v1.PriceLevel - * @enum {number} - * @property {number} PRICE_LEVEL_UNSPECIFIED=0 PRICE_LEVEL_UNSPECIFIED value - * @property {number} PRICE_LEVEL_FREE=1 PRICE_LEVEL_FREE value - * @property {number} PRICE_LEVEL_INEXPENSIVE=2 PRICE_LEVEL_INEXPENSIVE value - * @property {number} PRICE_LEVEL_MODERATE=3 PRICE_LEVEL_MODERATE value - * @property {number} PRICE_LEVEL_EXPENSIVE=4 PRICE_LEVEL_EXPENSIVE value - * @property {number} PRICE_LEVEL_VERY_EXPENSIVE=5 PRICE_LEVEL_VERY_EXPENSIVE value - */ - v1.PriceLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRICE_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRICE_LEVEL_FREE"] = 1; - values[valuesById[2] = "PRICE_LEVEL_INEXPENSIVE"] = 2; - values[valuesById[3] = "PRICE_LEVEL_MODERATE"] = 3; - values[valuesById[4] = "PRICE_LEVEL_EXPENSIVE"] = 4; - values[valuesById[5] = "PRICE_LEVEL_VERY_EXPENSIVE"] = 5; - return values; - })(); - - v1.Places = (function() { - - /** - * Constructs a new Places service. - * @memberof google.maps.places.v1 - * @classdesc Represents a Places - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Places(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Places.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Places; - - /** - * Creates new Places service using the specified rpc implementation. - * @function create - * @memberof google.maps.places.v1.Places - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Places} RPC service. Useful where requests and/or responses are streamed. - */ - Places.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. - * @memberof google.maps.places.v1.Places - * @typedef SearchNearbyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.SearchNearbyResponse} [response] SearchNearbyResponse - */ - - /** - * Calls SearchNearby. - * @function searchNearby - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object - * @param {google.maps.places.v1.Places.SearchNearbyCallback} callback Node-style callback called with the error, if any, and SearchNearbyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.searchNearby = function searchNearby(request, callback) { - return this.rpcCall(searchNearby, $root.google.maps.places.v1.SearchNearbyRequest, $root.google.maps.places.v1.SearchNearbyResponse, request, callback); - }, "name", { value: "SearchNearby" }); - - /** - * Calls SearchNearby. - * @function searchNearby - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.maps.places.v1.Places|searchText}. - * @memberof google.maps.places.v1.Places - * @typedef SearchTextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.SearchTextResponse} [response] SearchTextResponse - */ - - /** - * Calls SearchText. - * @function searchText - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object - * @param {google.maps.places.v1.Places.SearchTextCallback} callback Node-style callback called with the error, if any, and SearchTextResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.searchText = function searchText(request, callback) { - return this.rpcCall(searchText, $root.google.maps.places.v1.SearchTextRequest, $root.google.maps.places.v1.SearchTextResponse, request, callback); - }, "name", { value: "SearchText" }); - - /** - * Calls SearchText. - * @function searchText - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. - * @memberof google.maps.places.v1.Places - * @typedef GetPhotoMediaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.PhotoMedia} [response] PhotoMedia - */ - - /** - * Calls GetPhotoMedia. - * @function getPhotoMedia - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object - * @param {google.maps.places.v1.Places.GetPhotoMediaCallback} callback Node-style callback called with the error, if any, and PhotoMedia - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.getPhotoMedia = function getPhotoMedia(request, callback) { - return this.rpcCall(getPhotoMedia, $root.google.maps.places.v1.GetPhotoMediaRequest, $root.google.maps.places.v1.PhotoMedia, request, callback); - }, "name", { value: "GetPhotoMedia" }); - - /** - * Calls GetPhotoMedia. - * @function getPhotoMedia - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.maps.places.v1.Places|getPlace}. - * @memberof google.maps.places.v1.Places - * @typedef GetPlaceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.Place} [response] Place - */ - - /** - * Calls GetPlace. - * @function getPlace - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object - * @param {google.maps.places.v1.Places.GetPlaceCallback} callback Node-style callback called with the error, if any, and Place - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.getPlace = function getPlace(request, callback) { - return this.rpcCall(getPlace, $root.google.maps.places.v1.GetPlaceRequest, $root.google.maps.places.v1.Place, request, callback); - }, "name", { value: "GetPlace" }); - - /** - * Calls GetPlace. - * @function getPlace - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. - * @memberof google.maps.places.v1.Places - * @typedef AutocompletePlacesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.AutocompletePlacesResponse} [response] AutocompletePlacesResponse - */ - - /** - * Calls AutocompletePlaces. - * @function autocompletePlaces - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object - * @param {google.maps.places.v1.Places.AutocompletePlacesCallback} callback Node-style callback called with the error, if any, and AutocompletePlacesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.autocompletePlaces = function autocompletePlaces(request, callback) { - return this.rpcCall(autocompletePlaces, $root.google.maps.places.v1.AutocompletePlacesRequest, $root.google.maps.places.v1.AutocompletePlacesResponse, request, callback); - }, "name", { value: "AutocompletePlaces" }); - - /** - * Calls AutocompletePlaces. - * @function autocompletePlaces - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Places; - })(); - - v1.SearchNearbyRequest = (function() { - - /** - * Properties of a SearchNearbyRequest. - * @memberof google.maps.places.v1 - * @interface ISearchNearbyRequest - * @property {string|null} [languageCode] SearchNearbyRequest languageCode - * @property {string|null} [regionCode] SearchNearbyRequest regionCode - * @property {Array.|null} [includedTypes] SearchNearbyRequest includedTypes - * @property {Array.|null} [excludedTypes] SearchNearbyRequest excludedTypes - * @property {Array.|null} [includedPrimaryTypes] SearchNearbyRequest includedPrimaryTypes - * @property {Array.|null} [excludedPrimaryTypes] SearchNearbyRequest excludedPrimaryTypes - * @property {number|null} [maxResultCount] SearchNearbyRequest maxResultCount - * @property {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null} [locationRestriction] SearchNearbyRequest locationRestriction - * @property {google.maps.places.v1.SearchNearbyRequest.RankPreference|null} [rankPreference] SearchNearbyRequest rankPreference - */ - - /** - * Constructs a new SearchNearbyRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchNearbyRequest. - * @implements ISearchNearbyRequest - * @constructor - * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set - */ - function SearchNearbyRequest(properties) { - this.includedTypes = []; - this.excludedTypes = []; - this.includedPrimaryTypes = []; - this.excludedPrimaryTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchNearbyRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.languageCode = ""; - - /** - * SearchNearbyRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.regionCode = ""; - - /** - * SearchNearbyRequest includedTypes. - * @member {Array.} includedTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.includedTypes = $util.emptyArray; - - /** - * SearchNearbyRequest excludedTypes. - * @member {Array.} excludedTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.excludedTypes = $util.emptyArray; - - /** - * SearchNearbyRequest includedPrimaryTypes. - * @member {Array.} includedPrimaryTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.includedPrimaryTypes = $util.emptyArray; - - /** - * SearchNearbyRequest excludedPrimaryTypes. - * @member {Array.} excludedPrimaryTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.excludedPrimaryTypes = $util.emptyArray; - - /** - * SearchNearbyRequest maxResultCount. - * @member {number} maxResultCount - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.maxResultCount = 0; - - /** - * SearchNearbyRequest locationRestriction. - * @member {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.locationRestriction = null; - - /** - * SearchNearbyRequest rankPreference. - * @member {google.maps.places.v1.SearchNearbyRequest.RankPreference} rankPreference - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.rankPreference = 0; - - /** - * Creates a new SearchNearbyRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest instance - */ - SearchNearbyRequest.create = function create(properties) { - return new SearchNearbyRequest(properties); - }; - - /** - * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); - if (message.includedTypes != null && message.includedTypes.length) - for (var i = 0; i < message.includedTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.includedTypes[i]); - if (message.excludedTypes != null && message.excludedTypes.length) - for (var i = 0; i < message.excludedTypes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedTypes[i]); - if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedPrimaryTypes[i]); - if (message.excludedPrimaryTypes != null && message.excludedPrimaryTypes.length) - for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedPrimaryTypes[i]); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxResultCount); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rankPreference); - return writer; - }; - - /** - * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.languageCode = reader.string(); - break; - } - case 2: { - message.regionCode = reader.string(); - break; - } - case 3: { - if (!(message.includedTypes && message.includedTypes.length)) - message.includedTypes = []; - message.includedTypes.push(reader.string()); - break; - } - case 4: { - if (!(message.excludedTypes && message.excludedTypes.length)) - message.excludedTypes = []; - message.excludedTypes.push(reader.string()); - break; - } - case 5: { - if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) - message.includedPrimaryTypes = []; - message.includedPrimaryTypes.push(reader.string()); - break; - } - case 6: { - if (!(message.excludedPrimaryTypes && message.excludedPrimaryTypes.length)) - message.excludedPrimaryTypes = []; - message.excludedPrimaryTypes.push(reader.string()); - break; - } - case 7: { - message.maxResultCount = reader.int32(); - break; - } - case 8: { - message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 9: { - message.rankPreference = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchNearbyRequest message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchNearbyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.includedTypes != null && message.hasOwnProperty("includedTypes")) { - if (!Array.isArray(message.includedTypes)) - return "includedTypes: array expected"; - for (var i = 0; i < message.includedTypes.length; ++i) - if (!$util.isString(message.includedTypes[i])) - return "includedTypes: string[] expected"; - } - if (message.excludedTypes != null && message.hasOwnProperty("excludedTypes")) { - if (!Array.isArray(message.excludedTypes)) - return "excludedTypes: array expected"; - for (var i = 0; i < message.excludedTypes.length; ++i) - if (!$util.isString(message.excludedTypes[i])) - return "excludedTypes: string[] expected"; - } - if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { - if (!Array.isArray(message.includedPrimaryTypes)) - return "includedPrimaryTypes: array expected"; - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - if (!$util.isString(message.includedPrimaryTypes[i])) - return "includedPrimaryTypes: string[] expected"; - } - if (message.excludedPrimaryTypes != null && message.hasOwnProperty("excludedPrimaryTypes")) { - if (!Array.isArray(message.excludedPrimaryTypes)) - return "excludedPrimaryTypes: array expected"; - for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) - if (!$util.isString(message.excludedPrimaryTypes[i])) - return "excludedPrimaryTypes: string[] expected"; - } - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - switch (message.rankPreference) { - default: - return "rankPreference: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - */ - SearchNearbyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyRequest(); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.includedTypes) { - if (!Array.isArray(object.includedTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedTypes: array expected"); - message.includedTypes = []; - for (var i = 0; i < object.includedTypes.length; ++i) - message.includedTypes[i] = String(object.includedTypes[i]); - } - if (object.excludedTypes) { - if (!Array.isArray(object.excludedTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedTypes: array expected"); - message.excludedTypes = []; - for (var i = 0; i < object.excludedTypes.length; ++i) - message.excludedTypes[i] = String(object.excludedTypes[i]); - } - if (object.includedPrimaryTypes) { - if (!Array.isArray(object.includedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedPrimaryTypes: array expected"); - message.includedPrimaryTypes = []; - for (var i = 0; i < object.includedPrimaryTypes.length; ++i) - message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); - } - if (object.excludedPrimaryTypes) { - if (!Array.isArray(object.excludedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedPrimaryTypes: array expected"); - message.excludedPrimaryTypes = []; - for (var i = 0; i < object.excludedPrimaryTypes.length; ++i) - message.excludedPrimaryTypes[i] = String(object.excludedPrimaryTypes[i]); - } - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.fromObject(object.locationRestriction); - } - switch (object.rankPreference) { - default: - if (typeof object.rankPreference === "number") { - message.rankPreference = object.rankPreference; - break; - } - break; - case "RANK_PREFERENCE_UNSPECIFIED": - case 0: - message.rankPreference = 0; - break; - case "DISTANCE": - case 1: - message.rankPreference = 1; - break; - case "POPULARITY": - case 2: - message.rankPreference = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.SearchNearbyRequest} message SearchNearbyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchNearbyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includedTypes = []; - object.excludedTypes = []; - object.includedPrimaryTypes = []; - object.excludedPrimaryTypes = []; - } - if (options.defaults) { - object.languageCode = ""; - object.regionCode = ""; - object.maxResultCount = 0; - object.locationRestriction = null; - object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.includedTypes && message.includedTypes.length) { - object.includedTypes = []; - for (var j = 0; j < message.includedTypes.length; ++j) - object.includedTypes[j] = message.includedTypes[j]; - } - if (message.excludedTypes && message.excludedTypes.length) { - object.excludedTypes = []; - for (var j = 0; j < message.excludedTypes.length; ++j) - object.excludedTypes[j] = message.excludedTypes[j]; - } - if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { - object.includedPrimaryTypes = []; - for (var j = 0; j < message.includedPrimaryTypes.length; ++j) - object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; - } - if (message.excludedPrimaryTypes && message.excludedPrimaryTypes.length) { - object.excludedPrimaryTypes = []; - for (var j = 0; j < message.excludedPrimaryTypes.length; ++j) - object.excludedPrimaryTypes[j] = message.excludedPrimaryTypes[j]; - } - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] : message.rankPreference; - return object; - }; - - /** - * Converts this SearchNearbyRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - * @returns {Object.} JSON object - */ - SearchNearbyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchNearbyRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchNearbyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest"; - }; - - SearchNearbyRequest.LocationRestriction = (function() { - - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.SearchNearbyRequest - * @interface ILocationRestriction - * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle - */ - - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.SearchNearbyRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationRestriction circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.circle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LocationRestriction type. - * @member {"circle"|undefined} type - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["circle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.circle != null && message.hasOwnProperty("circle")) { - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.LocationRestriction.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; - - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest.LocationRestriction"; - }; - - return LocationRestriction; - })(); - - /** - * RankPreference enum. - * @name google.maps.places.v1.SearchNearbyRequest.RankPreference - * @enum {number} - * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value - * @property {number} DISTANCE=1 DISTANCE value - * @property {number} POPULARITY=2 POPULARITY value - */ - SearchNearbyRequest.RankPreference = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISTANCE"] = 1; - values[valuesById[2] = "POPULARITY"] = 2; - return values; - })(); - - return SearchNearbyRequest; - })(); - - v1.SearchNearbyResponse = (function() { - - /** - * Properties of a SearchNearbyResponse. - * @memberof google.maps.places.v1 - * @interface ISearchNearbyResponse - * @property {Array.|null} [places] SearchNearbyResponse places - */ - - /** - * Constructs a new SearchNearbyResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchNearbyResponse. - * @implements ISearchNearbyResponse - * @constructor - * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set - */ - function SearchNearbyResponse(properties) { - this.places = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchNearbyResponse places. - * @member {Array.} places - * @memberof google.maps.places.v1.SearchNearbyResponse - * @instance - */ - SearchNearbyResponse.prototype.places = $util.emptyArray; - - /** - * Creates a new SearchNearbyResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse instance - */ - SearchNearbyResponse.create = function create(properties) { - return new SearchNearbyResponse(properties); - }; - - /** - * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.places != null && message.places.length) - for (var i = 0; i < message.places.length; ++i) - $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.places && message.places.length)) - message.places = []; - message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchNearbyResponse message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchNearbyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.places != null && message.hasOwnProperty("places")) { - if (!Array.isArray(message.places)) - return "places: array expected"; - for (var i = 0; i < message.places.length; ++i) { - var error = $root.google.maps.places.v1.Place.verify(message.places[i]); - if (error) - return "places." + error; - } - } - return null; - }; - - /** - * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - */ - SearchNearbyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyResponse) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyResponse(); - if (object.places) { - if (!Array.isArray(object.places)) - throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: array expected"); - message.places = []; - for (var i = 0; i < object.places.length; ++i) { - if (typeof object.places[i] !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: object expected"); - message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.SearchNearbyResponse} message SearchNearbyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchNearbyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.places = []; - if (message.places && message.places.length) { - object.places = []; - for (var j = 0; j < message.places.length; ++j) - object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); - } - return object; - }; - - /** - * Converts this SearchNearbyResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyResponse - * @instance - * @returns {Object.} JSON object - */ - SearchNearbyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchNearbyResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchNearbyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyResponse"; - }; - - return SearchNearbyResponse; - })(); - - v1.SearchTextRequest = (function() { - - /** - * Properties of a SearchTextRequest. - * @memberof google.maps.places.v1 - * @interface ISearchTextRequest - * @property {string|null} [textQuery] SearchTextRequest textQuery - * @property {string|null} [languageCode] SearchTextRequest languageCode - * @property {string|null} [regionCode] SearchTextRequest regionCode - * @property {google.maps.places.v1.SearchTextRequest.RankPreference|null} [rankPreference] SearchTextRequest rankPreference - * @property {string|null} [includedType] SearchTextRequest includedType - * @property {boolean|null} [openNow] SearchTextRequest openNow - * @property {number|null} [minRating] SearchTextRequest minRating - * @property {number|null} [maxResultCount] SearchTextRequest maxResultCount - * @property {Array.|null} [priceLevels] SearchTextRequest priceLevels - * @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering - * @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias - * @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction - * @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions - */ - - /** - * Constructs a new SearchTextRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchTextRequest. - * @implements ISearchTextRequest - * @constructor - * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set - */ - function SearchTextRequest(properties) { - this.priceLevels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchTextRequest textQuery. - * @member {string} textQuery - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.textQuery = ""; - - /** - * SearchTextRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.languageCode = ""; - - /** - * SearchTextRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.regionCode = ""; - - /** - * SearchTextRequest rankPreference. - * @member {google.maps.places.v1.SearchTextRequest.RankPreference} rankPreference - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.rankPreference = 0; - - /** - * SearchTextRequest includedType. - * @member {string} includedType - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.includedType = ""; - - /** - * SearchTextRequest openNow. - * @member {boolean} openNow - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.openNow = false; - - /** - * SearchTextRequest minRating. - * @member {number} minRating - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.minRating = 0; - - /** - * SearchTextRequest maxResultCount. - * @member {number} maxResultCount - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.maxResultCount = 0; - - /** - * SearchTextRequest priceLevels. - * @member {Array.} priceLevels - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.priceLevels = $util.emptyArray; - - /** - * SearchTextRequest strictTypeFiltering. - * @member {boolean} strictTypeFiltering - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.strictTypeFiltering = false; - - /** - * SearchTextRequest locationBias. - * @member {google.maps.places.v1.SearchTextRequest.ILocationBias|null|undefined} locationBias - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.locationBias = null; - - /** - * SearchTextRequest locationRestriction. - * @member {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.locationRestriction = null; - - /** - * SearchTextRequest evOptions. - * @member {google.maps.places.v1.SearchTextRequest.IEVOptions|null|undefined} evOptions - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.evOptions = null; - - /** - * Creates a new SearchTextRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest instance - */ - SearchTextRequest.create = function create(properties) { - return new SearchTextRequest(properties); - }; - - /** - * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.textQuery != null && Object.hasOwnProperty.call(message, "textQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.textQuery); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); - if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rankPreference); - if (message.includedType != null && Object.hasOwnProperty.call(message, "includedType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.includedType); - if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.openNow); - if (message.minRating != null && Object.hasOwnProperty.call(message, "minRating")) - writer.uint32(/* id 9, wireType 1 =*/73).double(message.minRating); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxResultCount); - if (message.priceLevels != null && message.priceLevels.length) { - writer.uint32(/* id 11, wireType 2 =*/90).fork(); - for (var i = 0; i < message.priceLevels.length; ++i) - writer.int32(message.priceLevels[i]); - writer.ldelim(); - } - if (message.strictTypeFiltering != null && Object.hasOwnProperty.call(message, "strictTypeFiltering")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.strictTypeFiltering); - if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) - $root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions")) - $root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchTextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.textQuery = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.regionCode = reader.string(); - break; - } - case 4: { - message.rankPreference = reader.int32(); - break; - } - case 6: { - message.includedType = reader.string(); - break; - } - case 7: { - message.openNow = reader.bool(); - break; - } - case 9: { - message.minRating = reader.double(); - break; - } - case 10: { - message.maxResultCount = reader.int32(); - break; - } - case 11: { - if (!(message.priceLevels && message.priceLevels.length)) - message.priceLevels = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.priceLevels.push(reader.int32()); - } else - message.priceLevels.push(reader.int32()); - break; - } - case 12: { - message.strictTypeFiltering = reader.bool(); - break; - } - case 13: { - message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.decode(reader, reader.uint32()); - break; - } - case 14: { - message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 15: { - message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchTextRequest message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchTextRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.textQuery != null && message.hasOwnProperty("textQuery")) - if (!$util.isString(message.textQuery)) - return "textQuery: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - switch (message.rankPreference) { - default: - return "rankPreference: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.includedType != null && message.hasOwnProperty("includedType")) - if (!$util.isString(message.includedType)) - return "includedType: string expected"; - if (message.openNow != null && message.hasOwnProperty("openNow")) - if (typeof message.openNow !== "boolean") - return "openNow: boolean expected"; - if (message.minRating != null && message.hasOwnProperty("minRating")) - if (typeof message.minRating !== "number") - return "minRating: number expected"; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; - if (message.priceLevels != null && message.hasOwnProperty("priceLevels")) { - if (!Array.isArray(message.priceLevels)) - return "priceLevels: array expected"; - for (var i = 0; i < message.priceLevels.length; ++i) - switch (message.priceLevels[i]) { - default: - return "priceLevels: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) - if (typeof message.strictTypeFiltering !== "boolean") - return "strictTypeFiltering: boolean expected"; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) { - var error = $root.google.maps.places.v1.SearchTextRequest.LocationBias.verify(message.locationBias); - if (error) - return "locationBias." + error; - } - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.evOptions != null && message.hasOwnProperty("evOptions")) { - var error = $root.google.maps.places.v1.SearchTextRequest.EVOptions.verify(message.evOptions); - if (error) - return "evOptions." + error; - } - return null; - }; - - /** - * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - */ - SearchTextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest(); - if (object.textQuery != null) - message.textQuery = String(object.textQuery); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - switch (object.rankPreference) { - default: - if (typeof object.rankPreference === "number") { - message.rankPreference = object.rankPreference; - break; - } - break; - case "RANK_PREFERENCE_UNSPECIFIED": - case 0: - message.rankPreference = 0; - break; - case "DISTANCE": - case 1: - message.rankPreference = 1; - break; - case "RELEVANCE": - case 2: - message.rankPreference = 2; - break; - } - if (object.includedType != null) - message.includedType = String(object.includedType); - if (object.openNow != null) - message.openNow = Boolean(object.openNow); - if (object.minRating != null) - message.minRating = Number(object.minRating); - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; - if (object.priceLevels) { - if (!Array.isArray(object.priceLevels)) - throw TypeError(".google.maps.places.v1.SearchTextRequest.priceLevels: array expected"); - message.priceLevels = []; - for (var i = 0; i < object.priceLevels.length; ++i) - switch (object.priceLevels[i]) { - default: - if (typeof object.priceLevels[i] === "number") { - message.priceLevels[i] = object.priceLevels[i]; - break; - } - case "PRICE_LEVEL_UNSPECIFIED": - case 0: - message.priceLevels[i] = 0; - break; - case "PRICE_LEVEL_FREE": - case 1: - message.priceLevels[i] = 1; - break; - case "PRICE_LEVEL_INEXPENSIVE": - case 2: - message.priceLevels[i] = 2; - break; - case "PRICE_LEVEL_MODERATE": - case 3: - message.priceLevels[i] = 3; - break; - case "PRICE_LEVEL_EXPENSIVE": - case 4: - message.priceLevels[i] = 4; - break; - case "PRICE_LEVEL_VERY_EXPENSIVE": - case 5: - message.priceLevels[i] = 5; - break; - } - } - if (object.strictTypeFiltering != null) - message.strictTypeFiltering = Boolean(object.strictTypeFiltering); - if (object.locationBias != null) { - if (typeof object.locationBias !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.locationBias: object expected"); - message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.fromObject(object.locationBias); - } - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction); - } - if (object.evOptions != null) { - if (typeof object.evOptions !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected"); - message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions); - } - return message; - }; - - /** - * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.SearchTextRequest} message SearchTextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchTextRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.priceLevels = []; - if (options.defaults) { - object.textQuery = ""; - object.languageCode = ""; - object.regionCode = ""; - object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; - object.includedType = ""; - object.openNow = false; - object.minRating = 0; - object.maxResultCount = 0; - object.strictTypeFiltering = false; - object.locationBias = null; - object.locationRestriction = null; - object.evOptions = null; - } - if (message.textQuery != null && message.hasOwnProperty("textQuery")) - object.textQuery = message.textQuery; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] : message.rankPreference; - if (message.includedType != null && message.hasOwnProperty("includedType")) - object.includedType = message.includedType; - if (message.openNow != null && message.hasOwnProperty("openNow")) - object.openNow = message.openNow; - if (message.minRating != null && message.hasOwnProperty("minRating")) - object.minRating = options.json && !isFinite(message.minRating) ? String(message.minRating) : message.minRating; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; - if (message.priceLevels && message.priceLevels.length) { - object.priceLevels = []; - for (var j = 0; j < message.priceLevels.length; ++j) - object.priceLevels[j] = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] === undefined ? message.priceLevels[j] : $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] : message.priceLevels[j]; - } - if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) - object.strictTypeFiltering = message.strictTypeFiltering; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) - object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options); - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.evOptions != null && message.hasOwnProperty("evOptions")) - object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options); - return object; - }; - - /** - * Converts this SearchTextRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - * @returns {Object.} JSON object - */ - SearchTextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchTextRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest"; - }; - - /** - * RankPreference enum. - * @name google.maps.places.v1.SearchTextRequest.RankPreference - * @enum {number} - * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value - * @property {number} DISTANCE=1 DISTANCE value - * @property {number} RELEVANCE=2 RELEVANCE value - */ - SearchTextRequest.RankPreference = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISTANCE"] = 1; - values[valuesById[2] = "RELEVANCE"] = 2; - return values; - })(); - - SearchTextRequest.LocationBias = (function() { - - /** - * Properties of a LocationBias. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface ILocationBias - * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle - */ - - /** - * Constructs a new LocationBias. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a LocationBias. - * @implements ILocationBias - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set - */ - function LocationBias(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationBias rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - LocationBias.prototype.rectangle = null; - - /** - * LocationBias circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - LocationBias.prototype.circle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LocationBias type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - Object.defineProperty(LocationBias.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LocationBias instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias instance - */ - LocationBias.create = function create(properties) { - return new LocationBias(properties); - }; - - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationBias message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationBias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; - - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - */ - LocationBias.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationBias) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; - - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.LocationBias} message LocationBias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationBias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; - - /** - * Converts this LocationBias to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - * @returns {Object.} JSON object - */ - LocationBias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationBias - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationBias"; - }; - - return LocationBias; - })(); - - SearchTextRequest.LocationRestriction = (function() { - - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface ILocationRestriction - * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle - */ - - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationRestriction rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.rectangle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LocationRestriction type. - * @member {"rectangle"|undefined} type - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - return null; - }; - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationRestriction.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - return message; - }; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - return object; - }; - - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationRestriction"; - }; - - return LocationRestriction; - })(); - - SearchTextRequest.EVOptions = (function() { - - /** - * Properties of a EVOptions. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface IEVOptions - * @property {number|null} [minimumChargingRateKw] EVOptions minimumChargingRateKw - * @property {Array.|null} [connectorTypes] EVOptions connectorTypes - */ - - /** - * Constructs a new EVOptions. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a EVOptions. - * @implements IEVOptions - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set - */ - function EVOptions(properties) { - this.connectorTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EVOptions minimumChargingRateKw. - * @member {number} minimumChargingRateKw - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - */ - EVOptions.prototype.minimumChargingRateKw = 0; - - /** - * EVOptions connectorTypes. - * @member {Array.} connectorTypes - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - */ - EVOptions.prototype.connectorTypes = $util.emptyArray; - - /** - * Creates a new EVOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions instance - */ - EVOptions.create = function create(properties) { - return new EVOptions(properties); - }; - - /** - * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.minimumChargingRateKw != null && Object.hasOwnProperty.call(message, "minimumChargingRateKw")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimumChargingRateKw); - if (message.connectorTypes != null && message.connectorTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.connectorTypes.length; ++i) - writer.int32(message.connectorTypes[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a EVOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.minimumChargingRateKw = reader.double(); - break; - } - case 2: { - if (!(message.connectorTypes && message.connectorTypes.length)) - message.connectorTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.connectorTypes.push(reader.int32()); - } else - message.connectorTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a EVOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a EVOptions message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EVOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) - if (typeof message.minimumChargingRateKw !== "number") - return "minimumChargingRateKw: number expected"; - if (message.connectorTypes != null && message.hasOwnProperty("connectorTypes")) { - if (!Array.isArray(message.connectorTypes)) - return "connectorTypes: array expected"; - for (var i = 0; i < message.connectorTypes.length; ++i) - switch (message.connectorTypes[i]) { - default: - return "connectorTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - return null; - }; - - /** - * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - */ - EVOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.EVOptions) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); - if (object.minimumChargingRateKw != null) - message.minimumChargingRateKw = Number(object.minimumChargingRateKw); - if (object.connectorTypes) { - if (!Array.isArray(object.connectorTypes)) - throw TypeError(".google.maps.places.v1.SearchTextRequest.EVOptions.connectorTypes: array expected"); - message.connectorTypes = []; - for (var i = 0; i < object.connectorTypes.length; ++i) - switch (object.connectorTypes[i]) { - default: - if (typeof object.connectorTypes[i] === "number") { - message.connectorTypes[i] = object.connectorTypes[i]; - break; - } - case "EV_CONNECTOR_TYPE_UNSPECIFIED": - case 0: - message.connectorTypes[i] = 0; - break; - case "EV_CONNECTOR_TYPE_OTHER": - case 1: - message.connectorTypes[i] = 1; - break; - case "EV_CONNECTOR_TYPE_J1772": - case 2: - message.connectorTypes[i] = 2; - break; - case "EV_CONNECTOR_TYPE_TYPE_2": - case 3: - message.connectorTypes[i] = 3; - break; - case "EV_CONNECTOR_TYPE_CHADEMO": - case 4: - message.connectorTypes[i] = 4; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_1": - case 5: - message.connectorTypes[i] = 5; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_2": - case 6: - message.connectorTypes[i] = 6; - break; - case "EV_CONNECTOR_TYPE_TESLA": - case 7: - message.connectorTypes[i] = 7; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": - case 8: - message.connectorTypes[i] = 8; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": - case 9: - message.connectorTypes[i] = 9; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a EVOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.EVOptions} message EVOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EVOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connectorTypes = []; - if (options.defaults) - object.minimumChargingRateKw = 0; - if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) - object.minimumChargingRateKw = options.json && !isFinite(message.minimumChargingRateKw) ? String(message.minimumChargingRateKw) : message.minimumChargingRateKw; - if (message.connectorTypes && message.connectorTypes.length) { - object.connectorTypes = []; - for (var j = 0; j < message.connectorTypes.length; ++j) - object.connectorTypes[j] = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] === undefined ? message.connectorTypes[j] : $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] : message.connectorTypes[j]; - } - return object; - }; - - /** - * Converts this EVOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - * @returns {Object.} JSON object - */ - EVOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EVOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.EVOptions"; - }; - - return EVOptions; - })(); - - return SearchTextRequest; - })(); - - v1.SearchTextResponse = (function() { - - /** - * Properties of a SearchTextResponse. - * @memberof google.maps.places.v1 - * @interface ISearchTextResponse - * @property {Array.|null} [places] SearchTextResponse places - * @property {Array.|null} [contextualContents] SearchTextResponse contextualContents - */ - - /** - * Constructs a new SearchTextResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchTextResponse. - * @implements ISearchTextResponse - * @constructor - * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set - */ - function SearchTextResponse(properties) { - this.places = []; - this.contextualContents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchTextResponse places. - * @member {Array.} places - * @memberof google.maps.places.v1.SearchTextResponse - * @instance - */ - SearchTextResponse.prototype.places = $util.emptyArray; - - /** - * SearchTextResponse contextualContents. - * @member {Array.} contextualContents - * @memberof google.maps.places.v1.SearchTextResponse - * @instance - */ - SearchTextResponse.prototype.contextualContents = $util.emptyArray; - - /** - * Creates a new SearchTextResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse instance - */ - SearchTextResponse.create = function create(properties) { - return new SearchTextResponse(properties); - }; - - /** - * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.places != null && message.places.length) - for (var i = 0; i < message.places.length; ++i) - $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.contextualContents != null && message.contextualContents.length) - for (var i = 0; i < message.contextualContents.length; ++i) - $root.google.maps.places.v1.ContextualContent.encode(message.contextualContents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchTextResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.places && message.places.length)) - message.places = []; - message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.contextualContents && message.contextualContents.length)) - message.contextualContents = []; - message.contextualContents.push($root.google.maps.places.v1.ContextualContent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchTextResponse message. - * @function verify - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchTextResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.places != null && message.hasOwnProperty("places")) { - if (!Array.isArray(message.places)) - return "places: array expected"; - for (var i = 0; i < message.places.length; ++i) { - var error = $root.google.maps.places.v1.Place.verify(message.places[i]); - if (error) - return "places." + error; - } - } - if (message.contextualContents != null && message.hasOwnProperty("contextualContents")) { - if (!Array.isArray(message.contextualContents)) - return "contextualContents: array expected"; - for (var i = 0; i < message.contextualContents.length; ++i) { - var error = $root.google.maps.places.v1.ContextualContent.verify(message.contextualContents[i]); - if (error) - return "contextualContents." + error; - } - } - return null; - }; - - /** - * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - */ - SearchTextResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextResponse) - return object; - var message = new $root.google.maps.places.v1.SearchTextResponse(); - if (object.places) { - if (!Array.isArray(object.places)) - throw TypeError(".google.maps.places.v1.SearchTextResponse.places: array expected"); - message.places = []; - for (var i = 0; i < object.places.length; ++i) { - if (typeof object.places[i] !== "object") - throw TypeError(".google.maps.places.v1.SearchTextResponse.places: object expected"); - message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); - } - } - if (object.contextualContents) { - if (!Array.isArray(object.contextualContents)) - throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: array expected"); - message.contextualContents = []; - for (var i = 0; i < object.contextualContents.length; ++i) { - if (typeof object.contextualContents[i] !== "object") - throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: object expected"); - message.contextualContents[i] = $root.google.maps.places.v1.ContextualContent.fromObject(object.contextualContents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.SearchTextResponse} message SearchTextResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchTextResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.places = []; - object.contextualContents = []; - } - if (message.places && message.places.length) { - object.places = []; - for (var j = 0; j < message.places.length; ++j) - object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); - } - if (message.contextualContents && message.contextualContents.length) { - object.contextualContents = []; - for (var j = 0; j < message.contextualContents.length; ++j) - object.contextualContents[j] = $root.google.maps.places.v1.ContextualContent.toObject(message.contextualContents[j], options); - } - return object; - }; - - /** - * Converts this SearchTextResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextResponse - * @instance - * @returns {Object.} JSON object - */ - SearchTextResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchTextResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextResponse"; - }; - - return SearchTextResponse; - })(); - - v1.GetPhotoMediaRequest = (function() { - - /** - * Properties of a GetPhotoMediaRequest. - * @memberof google.maps.places.v1 - * @interface IGetPhotoMediaRequest - * @property {string|null} [name] GetPhotoMediaRequest name - * @property {number|null} [maxWidthPx] GetPhotoMediaRequest maxWidthPx - * @property {number|null} [maxHeightPx] GetPhotoMediaRequest maxHeightPx - * @property {boolean|null} [skipHttpRedirect] GetPhotoMediaRequest skipHttpRedirect - */ - - /** - * Constructs a new GetPhotoMediaRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a GetPhotoMediaRequest. - * @implements IGetPhotoMediaRequest - * @constructor - * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set - */ - function GetPhotoMediaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPhotoMediaRequest name. - * @member {string} name - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.name = ""; - - /** - * GetPhotoMediaRequest maxWidthPx. - * @member {number} maxWidthPx - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.maxWidthPx = 0; - - /** - * GetPhotoMediaRequest maxHeightPx. - * @member {number} maxHeightPx - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.maxHeightPx = 0; - - /** - * GetPhotoMediaRequest skipHttpRedirect. - * @member {boolean} skipHttpRedirect - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.skipHttpRedirect = false; - - /** - * Creates a new GetPhotoMediaRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest instance - */ - GetPhotoMediaRequest.create = function create(properties) { - return new GetPhotoMediaRequest(properties); - }; - - /** - * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPhotoMediaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.maxWidthPx != null && Object.hasOwnProperty.call(message, "maxWidthPx")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxWidthPx); - if (message.maxHeightPx != null && Object.hasOwnProperty.call(message, "maxHeightPx")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxHeightPx); - if (message.skipHttpRedirect != null && Object.hasOwnProperty.call(message, "skipHttpRedirect")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipHttpRedirect); - return writer; - }; - - /** - * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPhotoMediaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPhotoMediaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.maxWidthPx = reader.int32(); - break; - } - case 3: { - message.maxHeightPx = reader.int32(); - break; - } - case 4: { - message.skipHttpRedirect = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPhotoMediaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPhotoMediaRequest message. - * @function verify - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPhotoMediaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) - if (!$util.isInteger(message.maxWidthPx)) - return "maxWidthPx: integer expected"; - if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) - if (!$util.isInteger(message.maxHeightPx)) - return "maxHeightPx: integer expected"; - if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) - if (typeof message.skipHttpRedirect !== "boolean") - return "skipHttpRedirect: boolean expected"; - return null; - }; - - /** - * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - */ - GetPhotoMediaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.GetPhotoMediaRequest) - return object; - var message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.maxWidthPx != null) - message.maxWidthPx = object.maxWidthPx | 0; - if (object.maxHeightPx != null) - message.maxHeightPx = object.maxHeightPx | 0; - if (object.skipHttpRedirect != null) - message.skipHttpRedirect = Boolean(object.skipHttpRedirect); - return message; - }; - - /** - * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.GetPhotoMediaRequest} message GetPhotoMediaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPhotoMediaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.maxWidthPx = 0; - object.maxHeightPx = 0; - object.skipHttpRedirect = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) - object.maxWidthPx = message.maxWidthPx; - if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) - object.maxHeightPx = message.maxHeightPx; - if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) - object.skipHttpRedirect = message.skipHttpRedirect; - return object; - }; - - /** - * Converts this GetPhotoMediaRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - * @returns {Object.} JSON object - */ - GetPhotoMediaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPhotoMediaRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPhotoMediaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.GetPhotoMediaRequest"; - }; - - return GetPhotoMediaRequest; - })(); - - v1.PhotoMedia = (function() { - - /** - * Properties of a PhotoMedia. - * @memberof google.maps.places.v1 - * @interface IPhotoMedia - * @property {string|null} [name] PhotoMedia name - * @property {string|null} [photoUri] PhotoMedia photoUri - */ - - /** - * Constructs a new PhotoMedia. - * @memberof google.maps.places.v1 - * @classdesc Represents a PhotoMedia. - * @implements IPhotoMedia - * @constructor - * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set - */ - function PhotoMedia(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhotoMedia name. - * @member {string} name - * @memberof google.maps.places.v1.PhotoMedia - * @instance - */ - PhotoMedia.prototype.name = ""; - - /** - * PhotoMedia photoUri. - * @member {string} photoUri - * @memberof google.maps.places.v1.PhotoMedia - * @instance - */ - PhotoMedia.prototype.photoUri = ""; - - /** - * Creates a new PhotoMedia instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia instance - */ - PhotoMedia.create = function create(properties) { - return new PhotoMedia(properties); - }; - - /** - * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoMedia.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.photoUri); - return writer; - }; - - /** - * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoMedia.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhotoMedia message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoMedia.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.PhotoMedia(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.photoUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoMedia.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhotoMedia message. - * @function verify - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhotoMedia.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - if (!$util.isString(message.photoUri)) - return "photoUri: string expected"; - return null; - }; - - /** - * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - */ - PhotoMedia.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.PhotoMedia) - return object; - var message = new $root.google.maps.places.v1.PhotoMedia(); - if (object.name != null) - message.name = String(object.name); - if (object.photoUri != null) - message.photoUri = String(object.photoUri); - return message; - }; - - /** - * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.PhotoMedia} message PhotoMedia - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhotoMedia.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.photoUri = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - object.photoUri = message.photoUri; - return object; - }; - - /** - * Converts this PhotoMedia to JSON. - * @function toJSON - * @memberof google.maps.places.v1.PhotoMedia - * @instance - * @returns {Object.} JSON object - */ - PhotoMedia.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhotoMedia - * @function getTypeUrl - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhotoMedia.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.PhotoMedia"; - }; - - return PhotoMedia; - })(); - - v1.GetPlaceRequest = (function() { - - /** - * Properties of a GetPlaceRequest. - * @memberof google.maps.places.v1 - * @interface IGetPlaceRequest - * @property {string|null} [name] GetPlaceRequest name - * @property {string|null} [languageCode] GetPlaceRequest languageCode - * @property {string|null} [regionCode] GetPlaceRequest regionCode - * @property {string|null} [sessionToken] GetPlaceRequest sessionToken - */ - - /** - * Constructs a new GetPlaceRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a GetPlaceRequest. - * @implements IGetPlaceRequest - * @constructor - * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set - */ - function GetPlaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPlaceRequest name. - * @member {string} name - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.name = ""; - - /** - * GetPlaceRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.languageCode = ""; - - /** - * GetPlaceRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.regionCode = ""; - - /** - * GetPlaceRequest sessionToken. - * @member {string} sessionToken - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.sessionToken = ""; - - /** - * Creates a new GetPlaceRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest instance - */ - GetPlaceRequest.create = function create(properties) { - return new GetPlaceRequest(properties); - }; - - /** - * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPlaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); - if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionToken); - return writer; - }; - - /** - * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPlaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPlaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPlaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.regionCode = reader.string(); - break; - } - case 4: { - message.sessionToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPlaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPlaceRequest message. - * @function verify - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPlaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - if (!$util.isString(message.sessionToken)) - return "sessionToken: string expected"; - return null; - }; - - /** - * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - */ - GetPlaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.GetPlaceRequest) - return object; - var message = new $root.google.maps.places.v1.GetPlaceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.sessionToken != null) - message.sessionToken = String(object.sessionToken); - return message; - }; - - /** - * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.GetPlaceRequest} message GetPlaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPlaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; - object.regionCode = ""; - object.sessionToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - object.sessionToken = message.sessionToken; - return object; - }; - - /** - * Converts this GetPlaceRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - * @returns {Object.} JSON object - */ - GetPlaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPlaceRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPlaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.GetPlaceRequest"; - }; - - return GetPlaceRequest; - })(); - - v1.AutocompletePlacesRequest = (function() { - - /** - * Properties of an AutocompletePlacesRequest. - * @memberof google.maps.places.v1 - * @interface IAutocompletePlacesRequest - * @property {string|null} [input] AutocompletePlacesRequest input - * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null} [locationBias] AutocompletePlacesRequest locationBias - * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null} [locationRestriction] AutocompletePlacesRequest locationRestriction - * @property {Array.|null} [includedPrimaryTypes] AutocompletePlacesRequest includedPrimaryTypes - * @property {Array.|null} [includedRegionCodes] AutocompletePlacesRequest includedRegionCodes - * @property {string|null} [languageCode] AutocompletePlacesRequest languageCode - * @property {string|null} [regionCode] AutocompletePlacesRequest regionCode - * @property {google.type.ILatLng|null} [origin] AutocompletePlacesRequest origin - * @property {number|null} [inputOffset] AutocompletePlacesRequest inputOffset - * @property {boolean|null} [includeQueryPredictions] AutocompletePlacesRequest includeQueryPredictions - * @property {string|null} [sessionToken] AutocompletePlacesRequest sessionToken - */ - - /** - * Constructs a new AutocompletePlacesRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents an AutocompletePlacesRequest. - * @implements IAutocompletePlacesRequest - * @constructor - * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set - */ - function AutocompletePlacesRequest(properties) { - this.includedPrimaryTypes = []; - this.includedRegionCodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutocompletePlacesRequest input. - * @member {string} input - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.input = ""; - - /** - * AutocompletePlacesRequest locationBias. - * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null|undefined} locationBias - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.locationBias = null; - - /** - * AutocompletePlacesRequest locationRestriction. - * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.locationRestriction = null; - - /** - * AutocompletePlacesRequest includedPrimaryTypes. - * @member {Array.} includedPrimaryTypes - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includedPrimaryTypes = $util.emptyArray; - - /** - * AutocompletePlacesRequest includedRegionCodes. - * @member {Array.} includedRegionCodes - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includedRegionCodes = $util.emptyArray; - - /** - * AutocompletePlacesRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.languageCode = ""; - - /** - * AutocompletePlacesRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.regionCode = ""; - - /** - * AutocompletePlacesRequest origin. - * @member {google.type.ILatLng|null|undefined} origin - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.origin = null; - - /** - * AutocompletePlacesRequest inputOffset. - * @member {number} inputOffset - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.inputOffset = 0; - - /** - * AutocompletePlacesRequest includeQueryPredictions. - * @member {boolean} includeQueryPredictions - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includeQueryPredictions = false; - - /** - * AutocompletePlacesRequest sessionToken. - * @member {string} sessionToken - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.sessionToken = ""; - - /** - * Creates a new AutocompletePlacesRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest instance - */ - AutocompletePlacesRequest.create = function create(properties) { - return new AutocompletePlacesRequest(properties); - }; - - /** - * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.input != null && Object.hasOwnProperty.call(message, "input")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.input); - if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) - $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.includedPrimaryTypes[i]); - if (message.includedRegionCodes != null && message.includedRegionCodes.length) - for (var i = 0; i < message.includedRegionCodes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedRegionCodes[i]); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.regionCode); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) - $root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.inputOffset != null && Object.hasOwnProperty.call(message, "inputOffset")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.inputOffset); - if (message.includeQueryPredictions != null && Object.hasOwnProperty.call(message, "includeQueryPredictions")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.includeQueryPredictions); - if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.sessionToken); - return writer; - }; - - /** - * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.input = reader.string(); - break; - } - case 2: { - message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.decode(reader, reader.uint32()); - break; - } - case 3: { - message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) - message.includedPrimaryTypes = []; - message.includedPrimaryTypes.push(reader.string()); - break; - } - case 5: { - if (!(message.includedRegionCodes && message.includedRegionCodes.length)) - message.includedRegionCodes = []; - message.includedRegionCodes.push(reader.string()); - break; - } - case 6: { - message.languageCode = reader.string(); - break; - } - case 7: { - message.regionCode = reader.string(); - break; - } - case 8: { - message.origin = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 9: { - message.inputOffset = reader.int32(); - break; - } - case 10: { - message.includeQueryPredictions = reader.bool(); - break; - } - case 11: { - message.sessionToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutocompletePlacesRequest message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutocompletePlacesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.input != null && message.hasOwnProperty("input")) - if (!$util.isString(message.input)) - return "input: string expected"; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) { - var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify(message.locationBias); - if (error) - return "locationBias." + error; - } - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { - if (!Array.isArray(message.includedPrimaryTypes)) - return "includedPrimaryTypes: array expected"; - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - if (!$util.isString(message.includedPrimaryTypes[i])) - return "includedPrimaryTypes: string[] expected"; - } - if (message.includedRegionCodes != null && message.hasOwnProperty("includedRegionCodes")) { - if (!Array.isArray(message.includedRegionCodes)) - return "includedRegionCodes: array expected"; - for (var i = 0; i < message.includedRegionCodes.length; ++i) - if (!$util.isString(message.includedRegionCodes[i])) - return "includedRegionCodes: string[] expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.origin != null && message.hasOwnProperty("origin")) { - var error = $root.google.type.LatLng.verify(message.origin); - if (error) - return "origin." + error; - } - if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) - if (!$util.isInteger(message.inputOffset)) - return "inputOffset: integer expected"; - if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) - if (typeof message.includeQueryPredictions !== "boolean") - return "includeQueryPredictions: boolean expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - if (!$util.isString(message.sessionToken)) - return "sessionToken: string expected"; - return null; - }; - - /** - * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - */ - AutocompletePlacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); - if (object.input != null) - message.input = String(object.input); - if (object.locationBias != null) { - if (typeof object.locationBias !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationBias: object expected"); - message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.fromObject(object.locationBias); - } - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.fromObject(object.locationRestriction); - } - if (object.includedPrimaryTypes) { - if (!Array.isArray(object.includedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedPrimaryTypes: array expected"); - message.includedPrimaryTypes = []; - for (var i = 0; i < object.includedPrimaryTypes.length; ++i) - message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); - } - if (object.includedRegionCodes) { - if (!Array.isArray(object.includedRegionCodes)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedRegionCodes: array expected"); - message.includedRegionCodes = []; - for (var i = 0; i < object.includedRegionCodes.length; ++i) - message.includedRegionCodes[i] = String(object.includedRegionCodes[i]); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.origin != null) { - if (typeof object.origin !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.origin: object expected"); - message.origin = $root.google.type.LatLng.fromObject(object.origin); - } - if (object.inputOffset != null) - message.inputOffset = object.inputOffset | 0; - if (object.includeQueryPredictions != null) - message.includeQueryPredictions = Boolean(object.includeQueryPredictions); - if (object.sessionToken != null) - message.sessionToken = String(object.sessionToken); - return message; - }; - - /** - * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest} message AutocompletePlacesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutocompletePlacesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includedPrimaryTypes = []; - object.includedRegionCodes = []; - } - if (options.defaults) { - object.input = ""; - object.locationBias = null; - object.locationRestriction = null; - object.languageCode = ""; - object.regionCode = ""; - object.origin = null; - object.inputOffset = 0; - object.includeQueryPredictions = false; - object.sessionToken = ""; - } - if (message.input != null && message.hasOwnProperty("input")) - object.input = message.input; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) - object.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.toObject(message.locationBias, options); - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { - object.includedPrimaryTypes = []; - for (var j = 0; j < message.includedPrimaryTypes.length; ++j) - object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; - } - if (message.includedRegionCodes && message.includedRegionCodes.length) { - object.includedRegionCodes = []; - for (var j = 0; j < message.includedRegionCodes.length; ++j) - object.includedRegionCodes[j] = message.includedRegionCodes[j]; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.origin != null && message.hasOwnProperty("origin")) - object.origin = $root.google.type.LatLng.toObject(message.origin, options); - if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) - object.inputOffset = message.inputOffset; - if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) - object.includeQueryPredictions = message.includeQueryPredictions; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - object.sessionToken = message.sessionToken; - return object; - }; - - /** - * Converts this AutocompletePlacesRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - * @returns {Object.} JSON object - */ - AutocompletePlacesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutocompletePlacesRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutocompletePlacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest"; - }; - - AutocompletePlacesRequest.LocationBias = (function() { - - /** - * Properties of a LocationBias. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @interface ILocationBias - * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle - */ - - /** - * Constructs a new LocationBias. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @classdesc Represents a LocationBias. - * @implements ILocationBias - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set - */ - function LocationBias(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationBias rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - LocationBias.prototype.rectangle = null; - - /** - * LocationBias circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - LocationBias.prototype.circle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LocationBias type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - Object.defineProperty(LocationBias.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LocationBias instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias instance - */ - LocationBias.create = function create(properties) { - return new LocationBias(properties); - }; - - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationBias message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationBias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; - - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - */ - LocationBias.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; - - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} message LocationBias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationBias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; - - /** - * Converts this LocationBias to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - * @returns {Object.} JSON object - */ - LocationBias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationBias - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationBias"; - }; - - return LocationBias; - })(); - - AutocompletePlacesRequest.LocationRestriction = (function() { - - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @interface ILocationRestriction - * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle - */ - - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LocationRestriction rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.rectangle = null; - - /** - * LocationRestriction circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.circle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * LocationRestriction type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; - - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; - - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; - - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; - - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction"; - }; - - return LocationRestriction; - })(); - - return AutocompletePlacesRequest; - })(); - - v1.AutocompletePlacesResponse = (function() { - - /** - * Properties of an AutocompletePlacesResponse. - * @memberof google.maps.places.v1 - * @interface IAutocompletePlacesResponse - * @property {Array.|null} [suggestions] AutocompletePlacesResponse suggestions - */ - - /** - * Constructs a new AutocompletePlacesResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents an AutocompletePlacesResponse. - * @implements IAutocompletePlacesResponse - * @constructor - * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set - */ - function AutocompletePlacesResponse(properties) { - this.suggestions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AutocompletePlacesResponse suggestions. - * @member {Array.} suggestions - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @instance - */ - AutocompletePlacesResponse.prototype.suggestions = $util.emptyArray; - - /** - * Creates a new AutocompletePlacesResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse instance - */ - AutocompletePlacesResponse.create = function create(properties) { - return new AutocompletePlacesResponse(properties); - }; - - /** - * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.suggestions != null && message.suggestions.length) - for (var i = 0; i < message.suggestions.length; ++i) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.suggestions && message.suggestions.length)) - message.suggestions = []; - message.suggestions.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutocompletePlacesResponse message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutocompletePlacesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (!Array.isArray(message.suggestions)) - return "suggestions: array expected"; - for (var i = 0; i < message.suggestions.length; ++i) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify(message.suggestions[i]); - if (error) - return "suggestions." + error; - } - } - return null; - }; - - /** - * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - */ - AutocompletePlacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); - if (object.suggestions) { - if (!Array.isArray(object.suggestions)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: array expected"); - message.suggestions = []; - for (var i = 0; i < object.suggestions.length; ++i) { - if (typeof object.suggestions[i] !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: object expected"); - message.suggestions[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.fromObject(object.suggestions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse} message AutocompletePlacesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutocompletePlacesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.suggestions = []; - if (message.suggestions && message.suggestions.length) { - object.suggestions = []; - for (var j = 0; j < message.suggestions.length; ++j) - object.suggestions[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.toObject(message.suggestions[j], options); - } - return object; - }; - - /** - * Converts this AutocompletePlacesResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @instance - * @returns {Object.} JSON object - */ - AutocompletePlacesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AutocompletePlacesResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutocompletePlacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse"; - }; - - AutocompletePlacesResponse.Suggestion = (function() { - - /** - * Properties of a Suggestion. - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @interface ISuggestion - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null} [placePrediction] Suggestion placePrediction - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null} [queryPrediction] Suggestion queryPrediction - */ - - /** - * Constructs a new Suggestion. - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @classdesc Represents a Suggestion. - * @implements ISuggestion - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set - */ - function Suggestion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Suggestion placePrediction. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null|undefined} placePrediction - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Suggestion.prototype.placePrediction = null; - - /** - * Suggestion queryPrediction. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null|undefined} queryPrediction - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Suggestion.prototype.queryPrediction = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Suggestion kind. - * @member {"placePrediction"|"queryPrediction"|undefined} kind - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Object.defineProperty(Suggestion.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["placePrediction", "queryPrediction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Suggestion instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion instance - */ - Suggestion.create = function create(properties) { - return new Suggestion(properties); - }; - - /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.placePrediction != null && Object.hasOwnProperty.call(message, "placePrediction")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.encode(message.placePrediction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.queryPrediction != null && Object.hasOwnProperty.call(message, "queryPrediction")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.encode(message.queryPrediction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Suggestion message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.decode(reader, reader.uint32()); - break; - } - case 2: { - message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Suggestion message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Suggestion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { - properties.kind = 1; - { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify(message.placePrediction); - if (error) - return "placePrediction." + error; - } - } - if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify(message.queryPrediction); - if (error) - return "queryPrediction." + error; - } - } - return null; - }; - - /** - * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - */ - Suggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); - if (object.placePrediction != null) { - if (typeof object.placePrediction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.placePrediction: object expected"); - message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.fromObject(object.placePrediction); - } - if (object.queryPrediction != null) { - if (typeof object.queryPrediction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.queryPrediction: object expected"); - message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.fromObject(object.queryPrediction); - } - return message; - }; - - /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} message Suggestion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Suggestion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { - object.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.toObject(message.placePrediction, options); - if (options.oneofs) - object.kind = "placePrediction"; - } - if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { - object.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.toObject(message.queryPrediction, options); - if (options.oneofs) - object.kind = "queryPrediction"; - } - return object; - }; - - /** - * Converts this Suggestion to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - * @returns {Object.} JSON object - */ - Suggestion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Suggestion - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Suggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion"; - }; - - Suggestion.StringRange = (function() { - - /** - * Properties of a StringRange. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IStringRange - * @property {number|null} [startOffset] StringRange startOffset - * @property {number|null} [endOffset] StringRange endOffset - */ - - /** - * Constructs a new StringRange. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a StringRange. - * @implements IStringRange - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set - */ - function StringRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringRange startOffset. - * @member {number} startOffset - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - */ - StringRange.prototype.startOffset = 0; - - /** - * StringRange endOffset. - * @member {number} endOffset - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - */ - StringRange.prototype.endOffset = 0; - - /** - * Creates a new StringRange instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange instance - */ - StringRange.create = function create(properties) { - return new StringRange(properties); - }; - - /** - * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startOffset); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endOffset); - return writer; - }; - - /** - * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringRange message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startOffset = reader.int32(); - break; - } - case 2: { - message.endOffset = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringRange message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset)) - return "startOffset: integer expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset)) - return "endOffset: integer expected"; - return null; - }; - - /** - * Creates a StringRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - */ - StringRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); - if (object.startOffset != null) - message.startOffset = object.startOffset | 0; - if (object.endOffset != null) - message.endOffset = object.endOffset | 0; - return message; - }; - - /** - * Creates a plain object from a StringRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} message StringRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startOffset = 0; - object.endOffset = 0; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = message.endOffset; - return object; - }; - - /** - * Converts this StringRange to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - * @returns {Object.} JSON object - */ - StringRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringRange - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange"; - }; - - return StringRange; - })(); - - Suggestion.FormattableText = (function() { - - /** - * Properties of a FormattableText. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IFormattableText - * @property {string|null} [text] FormattableText text - * @property {Array.|null} [matches] FormattableText matches - */ - - /** - * Constructs a new FormattableText. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a FormattableText. - * @implements IFormattableText - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set - */ - function FormattableText(properties) { - this.matches = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FormattableText text. - * @member {string} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - */ - FormattableText.prototype.text = ""; - - /** - * FormattableText matches. - * @member {Array.} matches - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - */ - FormattableText.prototype.matches = $util.emptyArray; - - /** - * Creates a new FormattableText instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText instance - */ - FormattableText.create = function create(properties) { - return new FormattableText(properties); - }; - - /** - * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormattableText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.matches != null && message.matches.length) - for (var i = 0; i < message.matches.length; ++i) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.encode(message.matches[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormattableText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FormattableText message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormattableText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - if (!(message.matches && message.matches.length)) - message.matches = []; - message.matches.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FormattableText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormattableText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FormattableText message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FormattableText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.matches != null && message.hasOwnProperty("matches")) { - if (!Array.isArray(message.matches)) - return "matches: array expected"; - for (var i = 0; i < message.matches.length; ++i) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify(message.matches[i]); - if (error) - return "matches." + error; - } - } - return null; - }; - - /** - * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - */ - FormattableText.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); - if (object.text != null) - message.text = String(object.text); - if (object.matches) { - if (!Array.isArray(object.matches)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: array expected"); - message.matches = []; - for (var i = 0; i < object.matches.length; ++i) { - if (typeof object.matches[i] !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: object expected"); - message.matches[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.fromObject(object.matches[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FormattableText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} message FormattableText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FormattableText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.matches = []; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.matches && message.matches.length) { - object.matches = []; - for (var j = 0; j < message.matches.length; ++j) - object.matches[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.toObject(message.matches[j], options); - } - return object; - }; - - /** - * Converts this FormattableText to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - * @returns {Object.} JSON object - */ - FormattableText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FormattableText - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FormattableText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText"; - }; - - return FormattableText; - })(); - - Suggestion.StructuredFormat = (function() { - - /** - * Properties of a StructuredFormat. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IStructuredFormat - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [mainText] StructuredFormat mainText - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [secondaryText] StructuredFormat secondaryText - */ - - /** - * Constructs a new StructuredFormat. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a StructuredFormat. - * @implements IStructuredFormat - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set - */ - function StructuredFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StructuredFormat mainText. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} mainText - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - */ - StructuredFormat.prototype.mainText = null; - - /** - * StructuredFormat secondaryText. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} secondaryText - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - */ - StructuredFormat.prototype.secondaryText = null; - - /** - * Creates a new StructuredFormat instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat instance - */ - StructuredFormat.create = function create(properties) { - return new StructuredFormat(properties); - }; - - /** - * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StructuredFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mainText != null && Object.hasOwnProperty.call(message, "mainText")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.mainText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.secondaryText != null && Object.hasOwnProperty.call(message, "secondaryText")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.secondaryText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StructuredFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StructuredFormat message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StructuredFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StructuredFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StructuredFormat message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StructuredFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mainText != null && message.hasOwnProperty("mainText")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.mainText); - if (error) - return "mainText." + error; - } - if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.secondaryText); - if (error) - return "secondaryText." + error; - } - return null; - }; - - /** - * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - */ - StructuredFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); - if (object.mainText != null) { - if (typeof object.mainText !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.mainText: object expected"); - message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.mainText); - } - if (object.secondaryText != null) { - if (typeof object.secondaryText !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.secondaryText: object expected"); - message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.secondaryText); - } - return message; - }; - - /** - * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} message StructuredFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StructuredFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mainText = null; - object.secondaryText = null; - } - if (message.mainText != null && message.hasOwnProperty("mainText")) - object.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.mainText, options); - if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) - object.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.secondaryText, options); - return object; - }; - - /** - * Converts this StructuredFormat to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - * @returns {Object.} JSON object - */ - StructuredFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StructuredFormat - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StructuredFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat"; - }; - - return StructuredFormat; - })(); - - Suggestion.PlacePrediction = (function() { - - /** - * Properties of a PlacePrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IPlacePrediction - * @property {string|null} [place] PlacePrediction place - * @property {string|null} [placeId] PlacePrediction placeId - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] PlacePrediction text - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] PlacePrediction structuredFormat - * @property {Array.|null} [types] PlacePrediction types - * @property {number|null} [distanceMeters] PlacePrediction distanceMeters - */ - - /** - * Constructs a new PlacePrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a PlacePrediction. - * @implements IPlacePrediction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set - */ - function PlacePrediction(properties) { - this.types = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlacePrediction place. - * @member {string} place - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.place = ""; - - /** - * PlacePrediction placeId. - * @member {string} placeId - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.placeId = ""; - - /** - * PlacePrediction text. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.text = null; - - /** - * PlacePrediction structuredFormat. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.structuredFormat = null; - - /** - * PlacePrediction types. - * @member {Array.} types - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.types = $util.emptyArray; - - /** - * PlacePrediction distanceMeters. - * @member {number} distanceMeters - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.distanceMeters = 0; - - /** - * Creates a new PlacePrediction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction instance - */ - PlacePrediction.create = function create(properties) { - return new PlacePrediction(properties); - }; - - /** - * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacePrediction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.place != null && Object.hasOwnProperty.call(message, "place")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.place); - if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); - if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.distanceMeters); - return writer; - }; - - /** - * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacePrediction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PlacePrediction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacePrediction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.place = reader.string(); - break; - } - case 2: { - message.placeId = reader.string(); - break; - } - case 3: { - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 4: { - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 6: { - message.distanceMeters = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacePrediction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlacePrediction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlacePrediction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.place != null && message.hasOwnProperty("place")) - if (!$util.isString(message.place)) - return "place: string expected"; - if (message.placeId != null && message.hasOwnProperty("placeId")) - if (!$util.isString(message.placeId)) - return "placeId: string expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); - if (error) - return "text." + error; - } - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); - if (error) - return "structuredFormat." + error; - } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) - if (!$util.isInteger(message.distanceMeters)) - return "distanceMeters: integer expected"; - return null; - }; - - /** - * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - */ - PlacePrediction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); - if (object.place != null) - message.place = String(object.place); - if (object.placeId != null) - message.placeId = String(object.placeId); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.text: object expected"); - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); - } - if (object.structuredFormat != null) { - if (typeof object.structuredFormat !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.structuredFormat: object expected"); - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); - } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.distanceMeters != null) - message.distanceMeters = object.distanceMeters | 0; - return message; - }; - - /** - * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} message PlacePrediction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlacePrediction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) { - object.place = ""; - object.placeId = ""; - object.text = null; - object.structuredFormat = null; - object.distanceMeters = 0; - } - if (message.place != null && message.hasOwnProperty("place")) - object.place = message.place; - if (message.placeId != null && message.hasOwnProperty("placeId")) - object.placeId = message.placeId; - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) - object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) - object.distanceMeters = message.distanceMeters; - return object; - }; - - /** - * Converts this PlacePrediction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - * @returns {Object.} JSON object - */ - PlacePrediction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlacePrediction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlacePrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction"; - }; - - return PlacePrediction; - })(); - - Suggestion.QueryPrediction = (function() { - - /** - * Properties of a QueryPrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IQueryPrediction - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] QueryPrediction text - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] QueryPrediction structuredFormat - */ - - /** - * Constructs a new QueryPrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a QueryPrediction. - * @implements IQueryPrediction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set - */ - function QueryPrediction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPrediction text. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - */ - QueryPrediction.prototype.text = null; - - /** - * QueryPrediction structuredFormat. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - */ - QueryPrediction.prototype.structuredFormat = null; - - /** - * Creates a new QueryPrediction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction instance - */ - QueryPrediction.create = function create(properties) { - return new QueryPrediction(properties); - }; - - /** - * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPrediction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPrediction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPrediction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPrediction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPrediction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPrediction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPrediction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); - if (error) - return "text." + error; - } - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); - if (error) - return "structuredFormat." + error; - } - return null; - }; - - /** - * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - */ - QueryPrediction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.text: object expected"); - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); - } - if (object.structuredFormat != null) { - if (typeof object.structuredFormat !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.structuredFormat: object expected"); - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); - } - return message; - }; - - /** - * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} message QueryPrediction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPrediction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = null; - object.structuredFormat = null; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) - object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); - return object; - }; - - /** - * Converts this QueryPrediction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - * @returns {Object.} JSON object - */ - QueryPrediction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryPrediction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryPrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction"; - }; - - return QueryPrediction; - })(); - - return Suggestion; - })(); - - return AutocompletePlacesResponse; - })(); - - return v1; - })(); - - return places; - })(); - - return maps; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - return protobuf; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-maps-places/v1/protos/protos.json b/owl-bot-staging/google-maps-places/v1/protos/protos.json deleted file mode 100644 index 421226992bd..00000000000 --- a/owl-bot-staging/google-maps-places/v1/protos/protos.json +++ /dev/null @@ -1,3848 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "geo": { - "nested": { - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/geo/type/viewport;viewport", - "java_multiple_files": true, - "java_outer_classname": "ViewportProto", - "java_package": "com.google.geo.type", - "objc_class_prefix": "GGTP" - }, - "nested": { - "Viewport": { - "fields": { - "low": { - "type": "google.type.LatLng", - "id": 1 - }, - "high": { - "type": "google.type.LatLng", - "id": 2 - } - } - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/date;date", - "java_multiple_files": true, - "java_outer_classname": "DateProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "LatLng": { - "fields": { - "latitude": { - "type": "double", - "id": 1 - }, - "longitude": { - "type": "double", - "id": 2 - } - } - }, - "LocalizedText": { - "fields": { - "text": { - "type": "string", - "id": 1 - }, - "languageCode": { - "type": "string", - "id": 2 - } - } - }, - "Money": { - "fields": { - "currencyCode": { - "type": "string", - "id": 1 - }, - "units": { - "type": "int64", - "id": 2 - }, - "nanos": { - "type": "int32", - "id": 3 - } - } - }, - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - }, - "maps": { - "nested": { - "places": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Maps.Places.V1", - "go_package": "cloud.google.com/go/maps/places/apiv1/placespb;placespb", - "java_multiple_files": true, - "java_outer_classname": "PlacesServiceProto", - "java_package": "com.google.maps.places.v1", - "objc_class_prefix": "GMPSV1", - "php_namespace": "Google\\Maps\\Places\\V1" - }, - "nested": { - "AuthorAttribution": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "photoUri": { - "type": "string", - "id": 3 - } - } - }, - "ContentBlock": { - "fields": { - "topic": { - "type": "string", - "id": 1 - }, - "content": { - "type": "google.type.LocalizedText", - "id": 2 - }, - "references": { - "type": "References", - "id": 3 - } - } - }, - "References": { - "fields": { - "reviews": { - "rule": "repeated", - "type": "Review", - "id": 1 - }, - "places": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - } - } - }, - "Review": { - "options": { - "(google.api.resource).type": "places.googleapis.com/Review", - "(google.api.resource).pattern": "places/{place}/reviews/{review}", - "(google.api.resource).plural": "reviews", - "(google.api.resource).singular": "review" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "relativePublishTimeDescription": { - "type": "string", - "id": 2 - }, - "text": { - "type": "google.type.LocalizedText", - "id": 9 - }, - "originalText": { - "type": "google.type.LocalizedText", - "id": 12 - }, - "rating": { - "type": "double", - "id": 7 - }, - "authorAttribution": { - "type": "AuthorAttribution", - "id": 13 - }, - "publishTime": { - "type": "google.protobuf.Timestamp", - "id": 14 - } - } - }, - "ContextualContent": { - "fields": { - "reviews": { - "rule": "repeated", - "type": "Review", - "id": 1 - }, - "photos": { - "rule": "repeated", - "type": "Photo", - "id": 2 - }, - "justifications": { - "rule": "repeated", - "type": "Justification", - "id": 3 - } - }, - "nested": { - "Justification": { - "oneofs": { - "justification": { - "oneof": [ - "reviewJustification", - "businessAvailabilityAttributesJustification" - ] - } - }, - "fields": { - "reviewJustification": { - "type": "ReviewJustification", - "id": 1 - }, - "businessAvailabilityAttributesJustification": { - "type": "BusinessAvailabilityAttributesJustification", - "id": 2 - } - }, - "nested": { - "ReviewJustification": { - "fields": { - "highlightedText": { - "type": "HighlightedText", - "id": 1 - }, - "review": { - "type": "Review", - "id": 2 - } - }, - "nested": { - "HighlightedText": { - "fields": { - "text": { - "type": "string", - "id": 1 - }, - "highlightedTextRanges": { - "rule": "repeated", - "type": "HighlightedTextRange", - "id": 2 - } - }, - "nested": { - "HighlightedTextRange": { - "fields": { - "startIndex": { - "type": "int32", - "id": 1 - }, - "endIndex": { - "type": "int32", - "id": 2 - } - } - } - } - } - } - }, - "BusinessAvailabilityAttributesJustification": { - "fields": { - "takeout": { - "type": "bool", - "id": 1 - }, - "delivery": { - "type": "bool", - "id": 2 - }, - "dineIn": { - "type": "bool", - "id": 3 - } - } - } - } - } - } - }, - "Photo": { - "options": { - "(google.api.resource).type": "places.googleapis.com/Photo", - "(google.api.resource).pattern": "places/{place}/photos/{photo}", - "(google.api.resource).plural": "photos", - "(google.api.resource).singular": "photo" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "widthPx": { - "type": "int32", - "id": 2 - }, - "heightPx": { - "type": "int32", - "id": 3 - }, - "authorAttributions": { - "rule": "repeated", - "type": "AuthorAttribution", - "id": 4 - } - } - }, - "EVChargeOptions": { - "fields": { - "connectorCount": { - "type": "int32", - "id": 1 - }, - "connectorAggregation": { - "rule": "repeated", - "type": "ConnectorAggregation", - "id": 2 - } - }, - "nested": { - "ConnectorAggregation": { - "oneofs": { - "_availableCount": { - "oneof": [ - "availableCount" - ] - }, - "_outOfServiceCount": { - "oneof": [ - "outOfServiceCount" - ] - } - }, - "fields": { - "type": { - "type": "EVConnectorType", - "id": 1 - }, - "maxChargeRateKw": { - "type": "double", - "id": 2 - }, - "count": { - "type": "int32", - "id": 3 - }, - "availableCount": { - "type": "int32", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "outOfServiceCount": { - "type": "int32", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "availabilityLastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - } - } - }, - "EVConnectorType": { - "values": { - "EV_CONNECTOR_TYPE_UNSPECIFIED": 0, - "EV_CONNECTOR_TYPE_OTHER": 1, - "EV_CONNECTOR_TYPE_J1772": 2, - "EV_CONNECTOR_TYPE_TYPE_2": 3, - "EV_CONNECTOR_TYPE_CHADEMO": 4, - "EV_CONNECTOR_TYPE_CCS_COMBO_1": 5, - "EV_CONNECTOR_TYPE_CCS_COMBO_2": 6, - "EV_CONNECTOR_TYPE_TESLA": 7, - "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": 8, - "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": 9 - } - }, - "FuelOptions": { - "fields": { - "fuelPrices": { - "rule": "repeated", - "type": "FuelPrice", - "id": 1 - } - }, - "nested": { - "FuelPrice": { - "fields": { - "type": { - "type": "FuelType", - "id": 1 - }, - "price": { - "type": "google.type.Money", - "id": 2 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "FuelType": { - "values": { - "FUEL_TYPE_UNSPECIFIED": 0, - "DIESEL": 1, - "REGULAR_UNLEADED": 2, - "MIDGRADE": 3, - "PREMIUM": 4, - "SP91": 5, - "SP91_E10": 6, - "SP92": 7, - "SP95": 8, - "SP95_E10": 9, - "SP98": 10, - "SP99": 11, - "SP100": 12, - "LPG": 13, - "E80": 14, - "E85": 15, - "METHANE": 16, - "BIO_DIESEL": 17, - "TRUCK_DIESEL": 18 - } - } - } - } - } - }, - "Circle": { - "fields": { - "center": { - "type": "google.type.LatLng", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "radius": { - "type": "double", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Place": { - "options": { - "(google.api.resource).type": "places.googleapis.com/Place", - "(google.api.resource).pattern": "places/{place_id}", - "(google.api.resource).plural": "places", - "(google.api.resource).singular": "place" - }, - "oneofs": { - "_utcOffsetMinutes": { - "oneof": [ - "utcOffsetMinutes" - ] - }, - "_userRatingCount": { - "oneof": [ - "userRatingCount" - ] - }, - "_takeout": { - "oneof": [ - "takeout" - ] - }, - "_delivery": { - "oneof": [ - "delivery" - ] - }, - "_dineIn": { - "oneof": [ - "dineIn" - ] - }, - "_curbsidePickup": { - "oneof": [ - "curbsidePickup" - ] - }, - "_reservable": { - "oneof": [ - "reservable" - ] - }, - "_servesBreakfast": { - "oneof": [ - "servesBreakfast" - ] - }, - "_servesLunch": { - "oneof": [ - "servesLunch" - ] - }, - "_servesDinner": { - "oneof": [ - "servesDinner" - ] - }, - "_servesBeer": { - "oneof": [ - "servesBeer" - ] - }, - "_servesWine": { - "oneof": [ - "servesWine" - ] - }, - "_servesBrunch": { - "oneof": [ - "servesBrunch" - ] - }, - "_servesVegetarianFood": { - "oneof": [ - "servesVegetarianFood" - ] - }, - "_outdoorSeating": { - "oneof": [ - "outdoorSeating" - ] - }, - "_liveMusic": { - "oneof": [ - "liveMusic" - ] - }, - "_menuForChildren": { - "oneof": [ - "menuForChildren" - ] - }, - "_servesCocktails": { - "oneof": [ - "servesCocktails" - ] - }, - "_servesDessert": { - "oneof": [ - "servesDessert" - ] - }, - "_servesCoffee": { - "oneof": [ - "servesCoffee" - ] - }, - "_goodForChildren": { - "oneof": [ - "goodForChildren" - ] - }, - "_allowsDogs": { - "oneof": [ - "allowsDogs" - ] - }, - "_restroom": { - "oneof": [ - "restroom" - ] - }, - "_goodForGroups": { - "oneof": [ - "goodForGroups" - ] - }, - "_goodForWatchingSports": { - "oneof": [ - "goodForWatchingSports" - ] - }, - "_accessibilityOptions": { - "oneof": [ - "accessibilityOptions" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "id": { - "type": "string", - "id": 2 - }, - "displayName": { - "type": "google.type.LocalizedText", - "id": 31 - }, - "types": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "primaryType": { - "type": "string", - "id": 50 - }, - "primaryTypeDisplayName": { - "type": "google.type.LocalizedText", - "id": 32 - }, - "nationalPhoneNumber": { - "type": "string", - "id": 7 - }, - "internationalPhoneNumber": { - "type": "string", - "id": 8 - }, - "formattedAddress": { - "type": "string", - "id": 9 - }, - "shortFormattedAddress": { - "type": "string", - "id": 51 - }, - "addressComponents": { - "rule": "repeated", - "type": "AddressComponent", - "id": 10 - }, - "plusCode": { - "type": "PlusCode", - "id": 11 - }, - "location": { - "type": "google.type.LatLng", - "id": 12 - }, - "viewport": { - "type": "google.geo.type.Viewport", - "id": 13 - }, - "rating": { - "type": "double", - "id": 14 - }, - "googleMapsUri": { - "type": "string", - "id": 15 - }, - "websiteUri": { - "type": "string", - "id": 16 - }, - "reviews": { - "rule": "repeated", - "type": "Review", - "id": 53 - }, - "regularOpeningHours": { - "type": "OpeningHours", - "id": 21 - }, - "utcOffsetMinutes": { - "type": "int32", - "id": 22, - "options": { - "proto3_optional": true - } - }, - "photos": { - "rule": "repeated", - "type": "Photo", - "id": 54 - }, - "adrFormatAddress": { - "type": "string", - "id": 24 - }, - "businessStatus": { - "type": "BusinessStatus", - "id": 25 - }, - "priceLevel": { - "type": "PriceLevel", - "id": 26 - }, - "attributions": { - "rule": "repeated", - "type": "Attribution", - "id": 27 - }, - "userRatingCount": { - "type": "int32", - "id": 28, - "options": { - "proto3_optional": true - } - }, - "iconMaskBaseUri": { - "type": "string", - "id": 29 - }, - "iconBackgroundColor": { - "type": "string", - "id": 30 - }, - "takeout": { - "type": "bool", - "id": 33, - "options": { - "proto3_optional": true - } - }, - "delivery": { - "type": "bool", - "id": 34, - "options": { - "proto3_optional": true - } - }, - "dineIn": { - "type": "bool", - "id": 35, - "options": { - "proto3_optional": true - } - }, - "curbsidePickup": { - "type": "bool", - "id": 36, - "options": { - "proto3_optional": true - } - }, - "reservable": { - "type": "bool", - "id": 38, - "options": { - "proto3_optional": true - } - }, - "servesBreakfast": { - "type": "bool", - "id": 39, - "options": { - "proto3_optional": true - } - }, - "servesLunch": { - "type": "bool", - "id": 40, - "options": { - "proto3_optional": true - } - }, - "servesDinner": { - "type": "bool", - "id": 41, - "options": { - "proto3_optional": true - } - }, - "servesBeer": { - "type": "bool", - "id": 42, - "options": { - "proto3_optional": true - } - }, - "servesWine": { - "type": "bool", - "id": 43, - "options": { - "proto3_optional": true - } - }, - "servesBrunch": { - "type": "bool", - "id": 44, - "options": { - "proto3_optional": true - } - }, - "servesVegetarianFood": { - "type": "bool", - "id": 45, - "options": { - "proto3_optional": true - } - }, - "currentOpeningHours": { - "type": "OpeningHours", - "id": 46 - }, - "currentSecondaryOpeningHours": { - "rule": "repeated", - "type": "OpeningHours", - "id": 47 - }, - "regularSecondaryOpeningHours": { - "rule": "repeated", - "type": "OpeningHours", - "id": 49 - }, - "editorialSummary": { - "type": "google.type.LocalizedText", - "id": 52 - }, - "outdoorSeating": { - "type": "bool", - "id": 55, - "options": { - "proto3_optional": true - } - }, - "liveMusic": { - "type": "bool", - "id": 56, - "options": { - "proto3_optional": true - } - }, - "menuForChildren": { - "type": "bool", - "id": 57, - "options": { - "proto3_optional": true - } - }, - "servesCocktails": { - "type": "bool", - "id": 58, - "options": { - "proto3_optional": true - } - }, - "servesDessert": { - "type": "bool", - "id": 59, - "options": { - "proto3_optional": true - } - }, - "servesCoffee": { - "type": "bool", - "id": 60, - "options": { - "proto3_optional": true - } - }, - "goodForChildren": { - "type": "bool", - "id": 62, - "options": { - "proto3_optional": true - } - }, - "allowsDogs": { - "type": "bool", - "id": 63, - "options": { - "proto3_optional": true - } - }, - "restroom": { - "type": "bool", - "id": 64, - "options": { - "proto3_optional": true - } - }, - "goodForGroups": { - "type": "bool", - "id": 65, - "options": { - "proto3_optional": true - } - }, - "goodForWatchingSports": { - "type": "bool", - "id": 66, - "options": { - "proto3_optional": true - } - }, - "paymentOptions": { - "type": "PaymentOptions", - "id": 67 - }, - "parkingOptions": { - "type": "ParkingOptions", - "id": 70 - }, - "subDestinations": { - "rule": "repeated", - "type": "SubDestination", - "id": 71 - }, - "accessibilityOptions": { - "type": "AccessibilityOptions", - "id": 72, - "options": { - "proto3_optional": true - } - }, - "fuelOptions": { - "type": "FuelOptions", - "id": 78 - }, - "evChargeOptions": { - "type": "EVChargeOptions", - "id": 79 - }, - "generativeSummary": { - "type": "GenerativeSummary", - "id": 80 - }, - "areaSummary": { - "type": "AreaSummary", - "id": 81 - } - }, - "nested": { - "AddressComponent": { - "fields": { - "longText": { - "type": "string", - "id": 1 - }, - "shortText": { - "type": "string", - "id": 2 - }, - "types": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "languageCode": { - "type": "string", - "id": 4 - } - } - }, - "PlusCode": { - "fields": { - "globalCode": { - "type": "string", - "id": 1 - }, - "compoundCode": { - "type": "string", - "id": 2 - } - } - }, - "OpeningHours": { - "oneofs": { - "_openNow": { - "oneof": [ - "openNow" - ] - } - }, - "fields": { - "openNow": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "periods": { - "rule": "repeated", - "type": "Period", - "id": 2 - }, - "weekdayDescriptions": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "secondaryHoursType": { - "type": "SecondaryHoursType", - "id": 4 - }, - "specialDays": { - "rule": "repeated", - "type": "SpecialDay", - "id": 5 - } - }, - "nested": { - "Period": { - "fields": { - "open": { - "type": "Point", - "id": 1 - }, - "close": { - "type": "Point", - "id": 2 - } - }, - "nested": { - "Point": { - "oneofs": { - "_day": { - "oneof": [ - "day" - ] - }, - "_hour": { - "oneof": [ - "hour" - ] - }, - "_minute": { - "oneof": [ - "minute" - ] - } - }, - "fields": { - "day": { - "type": "int32", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "hour": { - "type": "int32", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "minute": { - "type": "int32", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "date": { - "type": "google.type.Date", - "id": 6 - }, - "truncated": { - "type": "bool", - "id": 5 - } - } - } - } - }, - "SecondaryHoursType": { - "values": { - "SECONDARY_HOURS_TYPE_UNSPECIFIED": 0, - "DRIVE_THROUGH": 1, - "HAPPY_HOUR": 2, - "DELIVERY": 3, - "TAKEOUT": 4, - "KITCHEN": 5, - "BREAKFAST": 6, - "LUNCH": 7, - "DINNER": 8, - "BRUNCH": 9, - "PICKUP": 10, - "ACCESS": 11, - "SENIOR_HOURS": 12, - "ONLINE_SERVICE_HOURS": 13 - } - }, - "SpecialDay": { - "fields": { - "date": { - "type": "google.type.Date", - "id": 1 - } - } - } - } - }, - "BusinessStatus": { - "values": { - "BUSINESS_STATUS_UNSPECIFIED": 0, - "OPERATIONAL": 1, - "CLOSED_TEMPORARILY": 2, - "CLOSED_PERMANENTLY": 3 - } - }, - "Attribution": { - "fields": { - "provider": { - "type": "string", - "id": 1 - }, - "providerUri": { - "type": "string", - "id": 2 - } - } - }, - "PaymentOptions": { - "oneofs": { - "_acceptsCreditCards": { - "oneof": [ - "acceptsCreditCards" - ] - }, - "_acceptsDebitCards": { - "oneof": [ - "acceptsDebitCards" - ] - }, - "_acceptsCashOnly": { - "oneof": [ - "acceptsCashOnly" - ] - }, - "_acceptsNfc": { - "oneof": [ - "acceptsNfc" - ] - } - }, - "fields": { - "acceptsCreditCards": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "acceptsDebitCards": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "acceptsCashOnly": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "acceptsNfc": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "ParkingOptions": { - "oneofs": { - "_freeParkingLot": { - "oneof": [ - "freeParkingLot" - ] - }, - "_paidParkingLot": { - "oneof": [ - "paidParkingLot" - ] - }, - "_freeStreetParking": { - "oneof": [ - "freeStreetParking" - ] - }, - "_paidStreetParking": { - "oneof": [ - "paidStreetParking" - ] - }, - "_valetParking": { - "oneof": [ - "valetParking" - ] - }, - "_freeGarageParking": { - "oneof": [ - "freeGarageParking" - ] - }, - "_paidGarageParking": { - "oneof": [ - "paidGarageParking" - ] - } - }, - "fields": { - "freeParkingLot": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "paidParkingLot": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "freeStreetParking": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "paidStreetParking": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "valetParking": { - "type": "bool", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "freeGarageParking": { - "type": "bool", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "paidGarageParking": { - "type": "bool", - "id": 7, - "options": { - "proto3_optional": true - } - } - } - }, - "SubDestination": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - }, - "id": { - "type": "string", - "id": 2 - } - } - }, - "AccessibilityOptions": { - "oneofs": { - "_wheelchairAccessibleParking": { - "oneof": [ - "wheelchairAccessibleParking" - ] - }, - "_wheelchairAccessibleEntrance": { - "oneof": [ - "wheelchairAccessibleEntrance" - ] - }, - "_wheelchairAccessibleRestroom": { - "oneof": [ - "wheelchairAccessibleRestroom" - ] - }, - "_wheelchairAccessibleSeating": { - "oneof": [ - "wheelchairAccessibleSeating" - ] - } - }, - "fields": { - "wheelchairAccessibleParking": { - "type": "bool", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "wheelchairAccessibleEntrance": { - "type": "bool", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "wheelchairAccessibleRestroom": { - "type": "bool", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "wheelchairAccessibleSeating": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "GenerativeSummary": { - "fields": { - "overview": { - "type": "google.type.LocalizedText", - "id": 1 - }, - "description": { - "type": "google.type.LocalizedText", - "id": 2 - }, - "references": { - "type": "References", - "id": 3 - } - } - }, - "AreaSummary": { - "fields": { - "contentBlocks": { - "rule": "repeated", - "type": "ContentBlock", - "id": 4 - } - } - } - } - }, - "PriceLevel": { - "values": { - "PRICE_LEVEL_UNSPECIFIED": 0, - "PRICE_LEVEL_FREE": 1, - "PRICE_LEVEL_INEXPENSIVE": 2, - "PRICE_LEVEL_MODERATE": 3, - "PRICE_LEVEL_EXPENSIVE": 4, - "PRICE_LEVEL_VERY_EXPENSIVE": 5 - } - }, - "Places": { - "options": { - "(google.api.default_host)": "places.googleapis.com" - }, - "methods": { - "SearchNearby": { - "requestType": "SearchNearbyRequest", - "responseType": "SearchNearbyResponse", - "options": { - "(google.api.http).post": "/v1/places:searchNearby", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/places:searchNearby", - "body": "*" - } - } - ] - }, - "SearchText": { - "requestType": "SearchTextRequest", - "responseType": "SearchTextResponse", - "options": { - "(google.api.http).post": "/v1/places:searchText", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/places:searchText", - "body": "*" - } - } - ] - }, - "GetPhotoMedia": { - "requestType": "GetPhotoMediaRequest", - "responseType": "PhotoMedia", - "options": { - "(google.api.http).get": "/v1/{name=places/*/photos/*/media}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=places/*/photos/*/media}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetPlace": { - "requestType": "GetPlaceRequest", - "responseType": "Place", - "options": { - "(google.api.http).get": "/v1/{name=places/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=places/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "AutocompletePlaces": { - "requestType": "AutocompletePlacesRequest", - "responseType": "AutocompletePlacesResponse", - "options": { - "(google.api.http).post": "/v1/places:autocomplete", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/places:autocomplete", - "body": "*" - } - } - ] - } - } - }, - "SearchNearbyRequest": { - "fields": { - "languageCode": { - "type": "string", - "id": 1 - }, - "regionCode": { - "type": "string", - "id": 2 - }, - "includedTypes": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "excludedTypes": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "includedPrimaryTypes": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "excludedPrimaryTypes": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "maxResultCount": { - "type": "int32", - "id": 7 - }, - "locationRestriction": { - "type": "LocationRestriction", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "rankPreference": { - "type": "RankPreference", - "id": 9 - } - }, - "nested": { - "LocationRestriction": { - "oneofs": { - "type": { - "oneof": [ - "circle" - ] - } - }, - "fields": { - "circle": { - "type": "Circle", - "id": 2 - } - } - }, - "RankPreference": { - "values": { - "RANK_PREFERENCE_UNSPECIFIED": 0, - "DISTANCE": 1, - "POPULARITY": 2 - } - } - } - }, - "SearchNearbyResponse": { - "fields": { - "places": { - "rule": "repeated", - "type": "Place", - "id": 1 - } - } - }, - "SearchTextRequest": { - "fields": { - "textQuery": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "languageCode": { - "type": "string", - "id": 2 - }, - "regionCode": { - "type": "string", - "id": 3 - }, - "rankPreference": { - "type": "RankPreference", - "id": 4 - }, - "includedType": { - "type": "string", - "id": 6 - }, - "openNow": { - "type": "bool", - "id": 7 - }, - "minRating": { - "type": "double", - "id": 9 - }, - "maxResultCount": { - "type": "int32", - "id": 10 - }, - "priceLevels": { - "rule": "repeated", - "type": "PriceLevel", - "id": 11 - }, - "strictTypeFiltering": { - "type": "bool", - "id": 12 - }, - "locationBias": { - "type": "LocationBias", - "id": 13 - }, - "locationRestriction": { - "type": "LocationRestriction", - "id": 14 - }, - "evOptions": { - "type": "EVOptions", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "RankPreference": { - "values": { - "RANK_PREFERENCE_UNSPECIFIED": 0, - "DISTANCE": 1, - "RELEVANCE": 2 - } - }, - "LocationBias": { - "oneofs": { - "type": { - "oneof": [ - "rectangle", - "circle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - }, - "circle": { - "type": "Circle", - "id": 2 - } - } - }, - "LocationRestriction": { - "oneofs": { - "type": { - "oneof": [ - "rectangle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - } - } - }, - "EVOptions": { - "fields": { - "minimumChargingRateKw": { - "type": "double", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "connectorTypes": { - "rule": "repeated", - "type": "EVConnectorType", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SearchTextResponse": { - "fields": { - "places": { - "rule": "repeated", - "type": "Place", - "id": 1 - }, - "contextualContents": { - "rule": "repeated", - "type": "ContextualContent", - "id": 3 - } - } - }, - "GetPhotoMediaRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "places.googleapis.com/PhotoMedia" - } - }, - "maxWidthPx": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxHeightPx": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "skipHttpRedirect": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PhotoMedia": { - "options": { - "(google.api.resource).type": "places.googleapis.com/PhotoMedia", - "(google.api.resource).pattern": "places/{place_id}/photos/{photo_reference}/media", - "(google.api.resource).plural": "photoMedias", - "(google.api.resource).singular": "photoMedia" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "photoUri": { - "type": "string", - "id": 2 - } - } - }, - "GetPlaceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - }, - "languageCode": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "regionCode": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sessionToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AutocompletePlacesRequest": { - "fields": { - "input": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "locationBias": { - "type": "LocationBias", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "locationRestriction": { - "type": "LocationRestriction", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includedPrimaryTypes": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includedRegionCodes": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "languageCode": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "regionCode": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "origin": { - "type": "google.type.LatLng", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "inputOffset": { - "type": "int32", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includeQueryPredictions": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sessionToken": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "LocationBias": { - "oneofs": { - "type": { - "oneof": [ - "rectangle", - "circle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - }, - "circle": { - "type": "Circle", - "id": 2 - } - } - }, - "LocationRestriction": { - "oneofs": { - "type": { - "oneof": [ - "rectangle", - "circle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - }, - "circle": { - "type": "Circle", - "id": 2 - } - } - } - } - }, - "AutocompletePlacesResponse": { - "fields": { - "suggestions": { - "rule": "repeated", - "type": "Suggestion", - "id": 1 - } - }, - "nested": { - "Suggestion": { - "oneofs": { - "kind": { - "oneof": [ - "placePrediction", - "queryPrediction" - ] - } - }, - "fields": { - "placePrediction": { - "type": "PlacePrediction", - "id": 1 - }, - "queryPrediction": { - "type": "QueryPrediction", - "id": 2 - } - }, - "nested": { - "StringRange": { - "fields": { - "startOffset": { - "type": "int32", - "id": 1 - }, - "endOffset": { - "type": "int32", - "id": 2 - } - } - }, - "FormattableText": { - "fields": { - "text": { - "type": "string", - "id": 1 - }, - "matches": { - "rule": "repeated", - "type": "StringRange", - "id": 2 - } - } - }, - "StructuredFormat": { - "fields": { - "mainText": { - "type": "FormattableText", - "id": 1 - }, - "secondaryText": { - "type": "FormattableText", - "id": 2 - } - } - }, - "PlacePrediction": { - "fields": { - "place": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - }, - "placeId": { - "type": "string", - "id": 2 - }, - "text": { - "type": "FormattableText", - "id": 3 - }, - "structuredFormat": { - "type": "StructuredFormat", - "id": 4 - }, - "types": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "distanceMeters": { - "type": "int32", - "id": 6 - } - } - }, - "QueryPrediction": { - "fields": { - "text": { - "type": "FormattableText", - "id": 1 - }, - "structuredFormat": { - "type": "StructuredFormat", - "id": 2 - } - } - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI" - }, - "nested": { - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js deleted file mode 100644 index 94f17586f3f..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.autocomplete_places.js +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(input) { - // [START places_v1_generated_Places_AutocompletePlaces_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The text string on which to search. - */ - // const input = 'abc123' - /** - * Optional. Bias results to a specified location. - * At most one of `location_bias` or `location_restriction` should be set. If - * neither are set, the results will be biased by IP address, meaning the IP - * address will be mapped to an imprecise location and used as a biasing - * signal. - */ - // const locationBias = {} - /** - * Optional. Restrict results to a specified location. - * At most one of `location_bias` or `location_restriction` should be set. If - * neither are set, the results will be biased by IP address, meaning the IP - * address will be mapped to an imprecise location and used as a biasing - * signal. - */ - // const locationRestriction = {} - /** - * Optional. Included primary Place type (for example, "restaurant" or - * "gas_station") in Place Types - * (https://developers.google.com/maps/documentation/places/web-service/place-types), - * or only `(regions)`, or only `(cities)`. A Place is only returned if its - * primary type is included in this list. Up to 5 values can be specified. If - * no types are specified, all Place types are returned. - */ - // const includedPrimaryTypes = ['abc','def'] - /** - * Optional. Only include results in the specified regions, specified as up to - * 15 CLDR two-character region codes. An empty set will not restrict the - * results. If both `location_restriction` and `included_region_codes` are - * set, the results will be located in the area of intersection. - */ - // const includedRegionCodes = ['abc','def'] - /** - * Optional. The language in which to return results. Defaults to en-US. The - * results may be in mixed languages if the language used in `input` is - * different from `language_code` or if the returned Place does not have a - * translation from the local language to `language_code`. - */ - // const languageCode = 'abc123' - /** - * Optional. The region code, specified as a CLDR two-character region code. - * This affects address formatting, result ranking, and may influence what - * results are returned. This does not restrict results to the specified - * region. To restrict results to a region, use `region_code_restriction`. - */ - // const regionCode = 'abc123' - /** - * Optional. The origin point from which to calculate geodesic distance to the - * destination (returned as `distance_meters`). If this value is omitted, - * geodesic distance will not be returned. - */ - // const origin = {} - /** - * Optional. A zero-based Unicode character offset of `input` indicating the - * cursor position in `input`. The cursor position may influence what - * predictions are returned. - * If empty, defaults to the length of `input`. - */ - // const inputOffset = 1234 - /** - * Optional. If true, the response will include both Place and query - * predictions. Otherwise the response will only return Place predictions. - */ - // const includeQueryPredictions = true - /** - * Optional. A string which identifies an Autocomplete session for billing - * purposes. Must be a URL and filename safe base64 string with at most 36 - * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - * returned. - * The session begins when the user starts typing a query, and concludes when - * they select a place and a call to Place Details or Address Validation is - * made. Each session can have multiple queries, followed by one Place Details - * or Address Validation request. The credentials used for each request within - * a session must belong to the same Google Cloud Console project. Once a - * session has concluded, the token is no longer valid; your app must generate - * a fresh token for each session. If the `session_token` parameter is - * omitted, or if you reuse a session token, the session is charged as if no - * session token was provided (each request is billed separately). - * We recommend the following guidelines: - * * Use session tokens for all Place Autocomplete calls. - * * Generate a fresh token for each session. Using a version 4 UUID is - * recommended. - * * Ensure that the credentials used for all Place Autocomplete, Place - * Details, and Address Validation requests within a session belong to the - * same Cloud Console project. - * * Be sure to pass a unique session token for each new session. Using the - * same token for more than one session will result in each request being - * billed individually. - */ - // const sessionToken = 'abc123' - - // Imports the Places library - const {PlacesClient} = require('@googlemaps/places').v1; - - // Instantiates a client - const placesClient = new PlacesClient(); - - async function callAutocompletePlaces() { - // Construct request - const request = { - input, - }; - - // Run request - const response = await placesClient.autocompletePlaces(request); - console.log(response); - } - - callAutocompletePlaces(); - // [END places_v1_generated_Places_AutocompletePlaces_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js deleted file mode 100644 index 2334f19dd6d..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_photo_media.js +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START places_v1_generated_Places_GetPhotoMedia_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of a photo media in the format: - * `places/{place_id}/photos/{photo_reference}/media`. - * The resource name of a photo as returned in a Place object's `photos.name` - * field comes with the format - * `places/{place_id}/photos/{photo_reference}`. You need to append `/media` - * at the end of the photo resource to get the photo media resource name. - */ - // const name = 'abc123' - /** - * Optional. Specifies the maximum desired width, in pixels, of the image. If - * the image is smaller than the values specified, the original image will be - * returned. If the image is larger in either dimension, it will be scaled to - * match the smaller of the two dimensions, restricted to its original aspect - * ratio. Both the max_height_px and max_width_px properties accept an integer - * between 1 and 4800, inclusively. If the value is not within the allowed - * range, an INVALID_ARGUMENT error will be returned. - * At least one of max_height_px or max_width_px needs to be specified. If - * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - * error will be returned. - */ - // const maxWidthPx = 1234 - /** - * Optional. Specifies the maximum desired height, in pixels, of the image. If - * the image is smaller than the values specified, the original image will be - * returned. If the image is larger in either dimension, it will be scaled to - * match the smaller of the two dimensions, restricted to its original aspect - * ratio. Both the max_height_px and max_width_px properties accept an integer - * between 1 and 4800, inclusively. If the value is not within the allowed - * range, an INVALID_ARGUMENT error will be returned. - * At least one of max_height_px or max_width_px needs to be specified. If - * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - * error will be returned. - */ - // const maxHeightPx = 1234 - /** - * Optional. If set, skip the default HTTP redirect behavior and render a text - * format (for example, in JSON format for HTTP use case) response. If not - * set, an HTTP redirect will be issued to redirect the call to the image - * media. This option is ignored for non-HTTP requests. - */ - // const skipHttpRedirect = true - - // Imports the Places library - const {PlacesClient} = require('@googlemaps/places').v1; - - // Instantiates a client - const placesClient = new PlacesClient(); - - async function callGetPhotoMedia() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await placesClient.getPhotoMedia(request); - console.log(response); - } - - callGetPhotoMedia(); - // [END places_v1_generated_Places_GetPhotoMedia_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js deleted file mode 100644 index 892573f2bc2..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.get_place.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START places_v1_generated_Places_GetPlace_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of a place, in the `places/{place_id}` format. - */ - // const name = 'abc123' - /** - * Optional. Place details will be displayed with the preferred language if - * available. - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - */ - // const languageCode = 'abc123' - /** - * Optional. The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * Note that 3-digit region codes are not currently supported. - */ - // const regionCode = 'abc123' - /** - * Optional. A string which identifies an Autocomplete session for billing - * purposes. Must be a URL and filename safe base64 string with at most 36 - * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - * returned. - * The session begins when the user starts typing a query, and concludes when - * they select a place and a call to Place Details or Address Validation is - * made. Each session can have multiple queries, followed by one Place Details - * or Address Validation request. The credentials used for each request within - * a session must belong to the same Google Cloud Console project. Once a - * session has concluded, the token is no longer valid; your app must generate - * a fresh token for each session. If the `session_token` parameter is - * omitted, or if you reuse a session token, the session is charged as if no - * session token was provided (each request is billed separately). - * We recommend the following guidelines: - * * Use session tokens for all Place Autocomplete calls. - * * Generate a fresh token for each session. Using a version 4 UUID is - * recommended. - * * Ensure that the credentials used for all Place Autocomplete, Place - * Details, and Address Validation requests within a session belong to the - * same Cloud Console project. - * * Be sure to pass a unique session token for each new session. Using the - * same token for more than one session will result in each request being - * billed individually. - */ - // const sessionToken = 'abc123' - - // Imports the Places library - const {PlacesClient} = require('@googlemaps/places').v1; - - // Instantiates a client - const placesClient = new PlacesClient(); - - async function callGetPlace() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await placesClient.getPlace(request); - console.log(response); - } - - callGetPlace(); - // [END places_v1_generated_Places_GetPlace_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js deleted file mode 100644 index cb9c6a6f247..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_nearby.js +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(locationRestriction) { - // [START places_v1_generated_Places_SearchNearby_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Place details will be displayed with the preferred language if available. - * If the language code is unspecified or unrecognized, place details of any - * language may be returned, with a preference for English if such details - * exist. - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - */ - // const languageCode = 'abc123' - /** - * The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * Note that 3-digit region codes are not currently supported. - */ - // const regionCode = 'abc123' - /** - * Included Place type (eg, "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * Up to 50 types from Table - * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * If there are any conflicting types, i.e. a type appears in both - * included_types and excluded_types, an INVALID_ARGUMENT error is - * returned. - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = "restaurant", excluded_primary_types = - * "restaurant" }, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - */ - // const includedTypes = ['abc','def'] - /** - * Excluded Place type (eg, "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * Up to 50 types from Table - * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * If the client provides both included_types (e.g. restaurant) and - * excluded_types (e.g. cafe), then the response should include places that - * are restaurant but not cafe. The response includes places that match at - * least one of the included_types and none of the excluded_types. - * If there are any conflicting types, i.e. a type appears in both - * included_types and excluded_types, an INVALID_ARGUMENT error is returned. - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = "restaurant", excluded_primary_types = - * "restaurant" }, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - */ - // const excludedTypes = ['abc','def'] - /** - * Included primary Place type (e.g. "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * A place can only have a single primary type from the supported types table - * associated with it. - * Up to 50 types from Table - * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * If there are any conflicting primary types, i.e. a type appears in both - * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - * error is returned. - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = "restaurant", excluded_primary_types = - * "restaurant" }, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - */ - // const includedPrimaryTypes = ['abc','def'] - /** - * Excluded primary Place type (e.g. "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * Up to 50 types from Table - * A (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * If there are any conflicting primary types, i.e. a type appears in both - * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - * error is returned. - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = "restaurant", excluded_primary_types = - * "restaurant" }, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - */ - // const excludedPrimaryTypes = ['abc','def'] - /** - * Maximum number of results to return. It must be between 1 and 20 (default), - * inclusively. If the number is unset, it falls back to the upper limit. If - * the number is set to negative or exceeds the upper limit, an - * INVALID_ARGUMENT error is returned. - */ - // const maxResultCount = 1234 - /** - * Required. The region to search. - */ - // const locationRestriction = {} - /** - * How results will be ranked in the response. - */ - // const rankPreference = {} - - // Imports the Places library - const {PlacesClient} = require('@googlemaps/places').v1; - - // Instantiates a client - const placesClient = new PlacesClient(); - - async function callSearchNearby() { - // Construct request - const request = { - locationRestriction, - }; - - // Run request - const response = await placesClient.searchNearby(request); - console.log(response); - } - - callSearchNearby(); - // [END places_v1_generated_Places_SearchNearby_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js deleted file mode 100644 index c219bf23c12..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/places.search_text.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(textQuery) { - // [START places_v1_generated_Places_SearchText_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The text query for textual search. - */ - // const textQuery = 'abc123' - /** - * Place details will be displayed with the preferred language if available. - * If the language code is unspecified or unrecognized, place details of any - * language may be returned, with a preference for English if such details - * exist. - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - */ - // const languageCode = 'abc123' - /** - * The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * Note that 3-digit region codes are not currently supported. - */ - // const regionCode = 'abc123' - /** - * How results will be ranked in the response. - */ - // const rankPreference = {} - /** - * The requested place type. Full list of types supported: - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * Only support one included type. - */ - // const includedType = 'abc123' - /** - * Used to restrict the search to places that are currently open. The default - * is false. - */ - // const openNow = true - /** - * Filter out results whose average user rating is strictly less than this - * limit. A valid value must be a float between 0 and 5 (inclusively) at a - * 0.5 cadence i.e. 0, 0.5, 1.0, ... , 5.0 inclusively. The input rating - * will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 - * will eliminate all results with a less than 1.0 rating. - */ - // const minRating = 1234 - /** - * Maximum number of results to return. It must be between 1 and 20, - * inclusively. The default is 20. If the number is unset, it falls back to - * the upper limit. If the number is set to negative or exceeds the upper - * limit, an INVALID_ARGUMENT error is returned. - */ - // const maxResultCount = 1234 - /** - * Used to restrict the search to places that are marked as certain price - * levels. Users can choose any combinations of price levels. Default to - * select all price levels. - */ - // const priceLevels = [1,2,3,4] - /** - * Used to set strict type filtering for included_type. If set to true, only - * results of the same type will be returned. Default to false. - */ - // const strictTypeFiltering = true - /** - * The region to search. This location serves as a bias which means results - * around given location might be returned. Cannot be set along with - * location_restriction. - */ - // const locationBias = {} - /** - * The region to search. This location serves as a restriction which means - * results outside given location will not be returned. Cannot be set along - * with location_bias. - */ - // const locationRestriction = {} - /** - * Optional. Set the searchable EV options of a place search request. - */ - // const evOptions = {} - - // Imports the Places library - const {PlacesClient} = require('@googlemaps/places').v1; - - // Instantiates a client - const placesClient = new PlacesClient(); - - async function callSearchText() { - // Construct request - const request = { - textQuery, - }; - - // Run request - const response = await placesClient.searchText(request); - console.log(response); - } - - callSearchText(); - // [END places_v1_generated_Places_SearchText_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json b/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json deleted file mode 100644 index b6c8447a828..00000000000 --- a/owl-bot-staging/google-maps-places/v1/samples/generated/v1/snippet_metadata_google.maps.places.v1.json +++ /dev/null @@ -1,359 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-places", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.maps.places.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "places_v1_generated_Places_SearchNearby_async", - "title": "Places searchNearby Sample", - "origin": "API_DEFINITION", - "description": " Search for places near locations.", - "canonical": true, - "file": "places.search_nearby.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 152, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchNearby", - "fullName": "google.maps.places.v1.Places.SearchNearby", - "async": true, - "parameters": [ - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "region_code", - "type": "TYPE_STRING" - }, - { - "name": "included_types", - "type": "TYPE_STRING[]" - }, - { - "name": "excluded_types", - "type": "TYPE_STRING[]" - }, - { - "name": "included_primary_types", - "type": "TYPE_STRING[]" - }, - { - "name": "excluded_primary_types", - "type": "TYPE_STRING[]" - }, - { - "name": "max_result_count", - "type": "TYPE_INT32" - }, - { - "name": "location_restriction", - "type": ".google.maps.places.v1.SearchNearbyRequest.LocationRestriction" - }, - { - "name": "rank_preference", - "type": ".google.maps.places.v1.SearchNearbyRequest.RankPreference" - } - ], - "resultType": ".google.maps.places.v1.SearchNearbyResponse", - "client": { - "shortName": "PlacesClient", - "fullName": "google.maps.places.v1.PlacesClient" - }, - "method": { - "shortName": "SearchNearby", - "fullName": "google.maps.places.v1.Places.SearchNearby", - "service": { - "shortName": "Places", - "fullName": "google.maps.places.v1.Places" - } - } - } - }, - { - "regionTag": "places_v1_generated_Places_SearchText_async", - "title": "Places searchText Sample", - "origin": "API_DEFINITION", - "description": " Text query based place search.", - "canonical": true, - "file": "places.search_text.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 129, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SearchText", - "fullName": "google.maps.places.v1.Places.SearchText", - "async": true, - "parameters": [ - { - "name": "text_query", - "type": "TYPE_STRING" - }, - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "region_code", - "type": "TYPE_STRING" - }, - { - "name": "rank_preference", - "type": ".google.maps.places.v1.SearchTextRequest.RankPreference" - }, - { - "name": "included_type", - "type": "TYPE_STRING" - }, - { - "name": "open_now", - "type": "TYPE_BOOL" - }, - { - "name": "min_rating", - "type": "TYPE_DOUBLE" - }, - { - "name": "max_result_count", - "type": "TYPE_INT32" - }, - { - "name": "price_levels", - "type": "TYPE_ENUM[]" - }, - { - "name": "strict_type_filtering", - "type": "TYPE_BOOL" - }, - { - "name": "location_bias", - "type": ".google.maps.places.v1.SearchTextRequest.LocationBias" - }, - { - "name": "location_restriction", - "type": ".google.maps.places.v1.SearchTextRequest.LocationRestriction" - }, - { - "name": "ev_options", - "type": ".google.maps.places.v1.SearchTextRequest.EVOptions" - } - ], - "resultType": ".google.maps.places.v1.SearchTextResponse", - "client": { - "shortName": "PlacesClient", - "fullName": "google.maps.places.v1.PlacesClient" - }, - "method": { - "shortName": "SearchText", - "fullName": "google.maps.places.v1.Places.SearchText", - "service": { - "shortName": "Places", - "fullName": "google.maps.places.v1.Places" - } - } - } - }, - { - "regionTag": "places_v1_generated_Places_GetPhotoMedia_async", - "title": "Places getPhotoMedia Sample", - "origin": "API_DEFINITION", - "description": " Get a photo media with a photo reference string.", - "canonical": true, - "file": "places.get_photo_media.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 91, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPhotoMedia", - "fullName": "google.maps.places.v1.Places.GetPhotoMedia", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "max_width_px", - "type": "TYPE_INT32" - }, - { - "name": "max_height_px", - "type": "TYPE_INT32" - }, - { - "name": "skip_http_redirect", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.maps.places.v1.PhotoMedia", - "client": { - "shortName": "PlacesClient", - "fullName": "google.maps.places.v1.PlacesClient" - }, - "method": { - "shortName": "GetPhotoMedia", - "fullName": "google.maps.places.v1.Places.GetPhotoMedia", - "service": { - "shortName": "Places", - "fullName": "google.maps.places.v1.Places" - } - } - } - }, - { - "regionTag": "places_v1_generated_Places_GetPlace_async", - "title": "Places getPlace Sample", - "origin": "API_DEFINITION", - "description": " Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format.", - "canonical": true, - "file": "places.get_place.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 96, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetPlace", - "fullName": "google.maps.places.v1.Places.GetPlace", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "region_code", - "type": "TYPE_STRING" - }, - { - "name": "session_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.maps.places.v1.Place", - "client": { - "shortName": "PlacesClient", - "fullName": "google.maps.places.v1.PlacesClient" - }, - "method": { - "shortName": "GetPlace", - "fullName": "google.maps.places.v1.Places.GetPlace", - "service": { - "shortName": "Places", - "fullName": "google.maps.places.v1.Places" - } - } - } - }, - { - "regionTag": "places_v1_generated_Places_AutocompletePlaces_async", - "title": "Places autocompletePlaces Sample", - "origin": "API_DEFINITION", - "description": " Returns predictions for the given input.", - "canonical": true, - "file": "places.autocomplete_places.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 143, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AutocompletePlaces", - "fullName": "google.maps.places.v1.Places.AutocompletePlaces", - "async": true, - "parameters": [ - { - "name": "input", - "type": "TYPE_STRING" - }, - { - "name": "location_bias", - "type": ".google.maps.places.v1.AutocompletePlacesRequest.LocationBias" - }, - { - "name": "location_restriction", - "type": ".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction" - }, - { - "name": "included_primary_types", - "type": "TYPE_STRING[]" - }, - { - "name": "included_region_codes", - "type": "TYPE_STRING[]" - }, - { - "name": "language_code", - "type": "TYPE_STRING" - }, - { - "name": "region_code", - "type": "TYPE_STRING" - }, - { - "name": "origin", - "type": ".google.type.LatLng" - }, - { - "name": "input_offset", - "type": "TYPE_INT32" - }, - { - "name": "include_query_predictions", - "type": "TYPE_BOOL" - }, - { - "name": "session_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.maps.places.v1.AutocompletePlacesResponse", - "client": { - "shortName": "PlacesClient", - "fullName": "google.maps.places.v1.PlacesClient" - }, - "method": { - "shortName": "AutocompletePlaces", - "fullName": "google.maps.places.v1.Places.AutocompletePlaces", - "service": { - "shortName": "Places", - "fullName": "google.maps.places.v1.Places" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-maps-places/v1/src/index.ts b/owl-bot-staging/google-maps-places/v1/src/index.ts deleted file mode 100644 index 0b4b848a4f1..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as v1 from './v1'; -const PlacesClient = v1.PlacesClient; -type PlacesClient = v1.PlacesClient; -export {v1, PlacesClient}; -export default {v1, PlacesClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 29fa123faa9..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.maps.places.v1", - "libraryPackage": "@googlemaps/places", - "services": { - "Places": { - "clients": { - "grpc": { - "libraryClient": "PlacesClient", - "rpcs": { - "SearchNearby": { - "methods": [ - "searchNearby" - ] - }, - "SearchText": { - "methods": [ - "searchText" - ] - }, - "GetPhotoMedia": { - "methods": [ - "getPhotoMedia" - ] - }, - "GetPlace": { - "methods": [ - "getPlace" - ] - }, - "AutocompletePlaces": { - "methods": [ - "autocompletePlaces" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PlacesClient", - "rpcs": { - "SearchNearby": { - "methods": [ - "searchNearby" - ] - }, - "SearchText": { - "methods": [ - "searchText" - ] - }, - "GetPhotoMedia": { - "methods": [ - "getPhotoMedia" - ] - }, - "GetPlace": { - "methods": [ - "getPlace" - ] - }, - "AutocompletePlaces": { - "methods": [ - "autocompletePlaces" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/index.ts b/owl-bot-staging/google-maps-places/v1/src/v1/index.ts deleted file mode 100644 index 15d80ec3383..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export {PlacesClient} from './places_client'; diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts b/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts deleted file mode 100644 index 96aa7f869b2..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/v1/places_client.ts +++ /dev/null @@ -1,1135 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/places_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './places_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service definition for the Places API. - * Note: every request (except for Autocomplete requests) requires a field mask - * set outside of the request proto (`all/*`, is not assumed). The field mask - * can be set via the HTTP header `X-Goog-FieldMask`. See: - * https://developers.google.com/maps/documentation/places/web-service/choose-fields - * @class - * @memberof v1 - */ -export class PlacesClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: {[method: string]: gax.CallSettings}; - private _universeDomain: string; - private _servicePath: string; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - placesStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PlacesClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new PlacesClient({fallback: true}, gax); - * ``` - */ - constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof PlacesClient; - if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) { - throw new Error('Please set either universe_domain or universeDomain, but not both.'); - } - const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined; - this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com'; - this._servicePath = 'places.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - photoPathTemplate: new this._gaxModule.PathTemplate( - 'places/{place}/photos/{photo}' - ), - photoMediaPathTemplate: new this._gaxModule.PathTemplate( - 'places/{place_id}/photos/{photo_reference}/media' - ), - placePathTemplate: new this._gaxModule.PathTemplate( - 'places/{place_id}' - ), - reviewPathTemplate: new this._gaxModule.PathTemplate( - 'places/{place}/reviews/{review}' - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.maps.places.v1.Places', gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, {'x-goog-api-client': clientHeader.join(' ')}); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.placesStub) { - return this.placesStub; - } - - // Put together the "service stub" for - // google.maps.places.v1.Places. - this.placesStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.maps.places.v1.Places') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.maps.places.v1.Places, - this._opts, this._providedCustomServicePath) as Promise<{[method: string]: Function}>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const placesStubMethods = - ['searchNearby', 'searchText', 'getPhotoMedia', 'getPlace', 'autocompletePlaces']; - for (const methodName of placesStubMethods) { - const callPromise = this.placesStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.placesStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'places.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); - } - return 'places.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return []; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Search for places near locations. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.languageCode - * Place details will be displayed with the preferred language if available. - * If the language code is unspecified or unrecognized, place details of any - * language may be returned, with a preference for English if such details - * exist. - * - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - * @param {string} request.regionCode - * The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * - * - * Note that 3-digit region codes are not currently supported. - * @param {string[]} request.includedTypes - * Included Place type (eg, "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * - * Up to 50 types from [Table - * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * - * If there are any conflicting types, i.e. a type appears in both - * included_types and excluded_types, an INVALID_ARGUMENT error is - * returned. - * - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = ["restaurant"], excluded_primary_types = - * ["restaurant"]}, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - * @param {string[]} request.excludedTypes - * Excluded Place type (eg, "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * - * Up to 50 types from [Table - * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * - * If the client provides both included_types (e.g. restaurant) and - * excluded_types (e.g. cafe), then the response should include places that - * are restaurant but not cafe. The response includes places that match at - * least one of the included_types and none of the excluded_types. - * - * If there are any conflicting types, i.e. a type appears in both - * included_types and excluded_types, an INVALID_ARGUMENT error is returned. - * - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = ["restaurant"], excluded_primary_types = - * ["restaurant"]}, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - * @param {string[]} request.includedPrimaryTypes - * Included primary Place type (e.g. "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * A place can only have a single primary type from the supported types table - * associated with it. - * - * Up to 50 types from [Table - * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * - * If there are any conflicting primary types, i.e. a type appears in both - * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - * error is returned. - * - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = ["restaurant"], excluded_primary_types = - * ["restaurant"]}, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - * @param {string[]} request.excludedPrimaryTypes - * Excluded primary Place type (e.g. "restaurant" or "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * - * Up to 50 types from [Table - * A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) - * may be specified. - * - * If there are any conflicting primary types, i.e. a type appears in both - * included_primary_types and excluded_primary_types, an INVALID_ARGUMENT - * error is returned. - * - * If a Place type is specified with multiple type restrictions, only places - * that satisfy all of the restrictions are returned. For example, if we - * have {included_types = ["restaurant"], excluded_primary_types = - * ["restaurant"]}, the returned places provide "restaurant" - * related services but do not operate primarily as "restaurants". - * @param {number} request.maxResultCount - * Maximum number of results to return. It must be between 1 and 20 (default), - * inclusively. If the number is unset, it falls back to the upper limit. If - * the number is set to negative or exceeds the upper limit, an - * INVALID_ARGUMENT error is returned. - * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} request.locationRestriction - * Required. The region to search. - * @param {google.maps.places.v1.SearchNearbyRequest.RankPreference} request.rankPreference - * How results will be ranked in the response. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.maps.places.v1.SearchNearbyResponse|SearchNearbyResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/places.search_nearby.js - * region_tag:places_v1_generated_Places_SearchNearby_async - */ - searchNearby( - request?: protos.google.maps.places.v1.ISearchNearbyRequest, - options?: CallOptions): - Promise<[ - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|undefined, {}|undefined - ]>; - searchNearby( - request: protos.google.maps.places.v1.ISearchNearbyRequest, - options: CallOptions, - callback: Callback< - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, - {}|null|undefined>): void; - searchNearby( - request: protos.google.maps.places.v1.ISearchNearbyRequest, - callback: Callback< - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, - {}|null|undefined>): void; - searchNearby( - request?: protos.google.maps.places.v1.ISearchNearbyRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.maps.places.v1.ISearchNearbyResponse, - protos.google.maps.places.v1.ISearchNearbyRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); - return this.innerApiCalls.searchNearby(request, options, callback); - } -/** - * Text query based place search. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.textQuery - * Required. The text query for textual search. - * @param {string} request.languageCode - * Place details will be displayed with the preferred language if available. - * If the language code is unspecified or unrecognized, place details of any - * language may be returned, with a preference for English if such details - * exist. - * - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - * @param {string} request.regionCode - * The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * - * - * Note that 3-digit region codes are not currently supported. - * @param {google.maps.places.v1.SearchTextRequest.RankPreference} request.rankPreference - * How results will be ranked in the response. - * @param {string} request.includedType - * The requested place type. Full list of types supported: - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * Only support one included type. - * @param {boolean} request.openNow - * Used to restrict the search to places that are currently open. The default - * is false. - * @param {number} request.minRating - * Filter out results whose average user rating is strictly less than this - * limit. A valid value must be a float between 0 and 5 (inclusively) at a - * 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating - * will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 - * will eliminate all results with a less than 1.0 rating. - * @param {number} request.maxResultCount - * Maximum number of results to return. It must be between 1 and 20, - * inclusively. The default is 20. If the number is unset, it falls back to - * the upper limit. If the number is set to negative or exceeds the upper - * limit, an INVALID_ARGUMENT error is returned. - * @param {number[]} request.priceLevels - * Used to restrict the search to places that are marked as certain price - * levels. Users can choose any combinations of price levels. Default to - * select all price levels. - * @param {boolean} request.strictTypeFiltering - * Used to set strict type filtering for included_type. If set to true, only - * results of the same type will be returned. Default to false. - * @param {google.maps.places.v1.SearchTextRequest.LocationBias} request.locationBias - * The region to search. This location serves as a bias which means results - * around given location might be returned. Cannot be set along with - * location_restriction. - * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} request.locationRestriction - * The region to search. This location serves as a restriction which means - * results outside given location will not be returned. Cannot be set along - * with location_bias. - * @param {google.maps.places.v1.SearchTextRequest.EVOptions} [request.evOptions] - * Optional. Set the searchable EV options of a place search request. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.maps.places.v1.SearchTextResponse|SearchTextResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/places.search_text.js - * region_tag:places_v1_generated_Places_SearchText_async - */ - searchText( - request?: protos.google.maps.places.v1.ISearchTextRequest, - options?: CallOptions): - Promise<[ - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|undefined, {}|undefined - ]>; - searchText( - request: protos.google.maps.places.v1.ISearchTextRequest, - options: CallOptions, - callback: Callback< - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|null|undefined, - {}|null|undefined>): void; - searchText( - request: protos.google.maps.places.v1.ISearchTextRequest, - callback: Callback< - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|null|undefined, - {}|null|undefined>): void; - searchText( - request?: protos.google.maps.places.v1.ISearchTextRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.maps.places.v1.ISearchTextResponse, - protos.google.maps.places.v1.ISearchTextRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); - return this.innerApiCalls.searchText(request, options, callback); - } -/** - * Get a photo media with a photo reference string. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of a photo media in the format: - * `places/{place_id}/photos/{photo_reference}/media`. - * - * The resource name of a photo as returned in a Place object's `photos.name` - * field comes with the format - * `places/{place_id}/photos/{photo_reference}`. You need to append `/media` - * at the end of the photo resource to get the photo media resource name. - * @param {number} [request.maxWidthPx] - * Optional. Specifies the maximum desired width, in pixels, of the image. If - * the image is smaller than the values specified, the original image will be - * returned. If the image is larger in either dimension, it will be scaled to - * match the smaller of the two dimensions, restricted to its original aspect - * ratio. Both the max_height_px and max_width_px properties accept an integer - * between 1 and 4800, inclusively. If the value is not within the allowed - * range, an INVALID_ARGUMENT error will be returned. - * - * At least one of max_height_px or max_width_px needs to be specified. If - * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - * error will be returned. - * @param {number} [request.maxHeightPx] - * Optional. Specifies the maximum desired height, in pixels, of the image. If - * the image is smaller than the values specified, the original image will be - * returned. If the image is larger in either dimension, it will be scaled to - * match the smaller of the two dimensions, restricted to its original aspect - * ratio. Both the max_height_px and max_width_px properties accept an integer - * between 1 and 4800, inclusively. If the value is not within the allowed - * range, an INVALID_ARGUMENT error will be returned. - * - * At least one of max_height_px or max_width_px needs to be specified. If - * neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT - * error will be returned. - * @param {boolean} [request.skipHttpRedirect] - * Optional. If set, skip the default HTTP redirect behavior and render a text - * format (for example, in JSON format for HTTP use case) response. If not - * set, an HTTP redirect will be issued to redirect the call to the image - * media. This option is ignored for non-HTTP requests. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.maps.places.v1.PhotoMedia|PhotoMedia}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/places.get_photo_media.js - * region_tag:places_v1_generated_Places_GetPhotoMedia_async - */ - getPhotoMedia( - request?: protos.google.maps.places.v1.IGetPhotoMediaRequest, - options?: CallOptions): - Promise<[ - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|undefined, {}|undefined - ]>; - getPhotoMedia( - request: protos.google.maps.places.v1.IGetPhotoMediaRequest, - options: CallOptions, - callback: Callback< - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, - {}|null|undefined>): void; - getPhotoMedia( - request: protos.google.maps.places.v1.IGetPhotoMediaRequest, - callback: Callback< - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, - {}|null|undefined>): void; - getPhotoMedia( - request?: protos.google.maps.places.v1.IGetPhotoMediaRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.maps.places.v1.IPhotoMedia, - protos.google.maps.places.v1.IGetPhotoMediaRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getPhotoMedia(request, options, callback); - } -/** - * Get the details of a place based on its resource name, which is a string - * in the `places/{place_id}` format. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of a place, in the `places/{place_id}` format. - * @param {string} [request.languageCode] - * Optional. Place details will be displayed with the preferred language if - * available. - * - * Current list of supported languages: - * https://developers.google.com/maps/faq#languagesupport. - * @param {string} [request.regionCode] - * Optional. The Unicode country/region code (CLDR) of the location where the - * request is coming from. This parameter is used to display the place - * details, like region-specific place name, if available. The parameter can - * affect results based on applicable law. - * For more information, see - * https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. - * - * - * Note that 3-digit region codes are not currently supported. - * @param {string} [request.sessionToken] - * Optional. A string which identifies an Autocomplete session for billing - * purposes. Must be a URL and filename safe base64 string with at most 36 - * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - * returned. - * - * The session begins when the user starts typing a query, and concludes when - * they select a place and a call to Place Details or Address Validation is - * made. Each session can have multiple queries, followed by one Place Details - * or Address Validation request. The credentials used for each request within - * a session must belong to the same Google Cloud Console project. Once a - * session has concluded, the token is no longer valid; your app must generate - * a fresh token for each session. If the `session_token` parameter is - * omitted, or if you reuse a session token, the session is charged as if no - * session token was provided (each request is billed separately). - * - * We recommend the following guidelines: - * - * * Use session tokens for all Place Autocomplete calls. - * * Generate a fresh token for each session. Using a version 4 UUID is - * recommended. - * * Ensure that the credentials used for all Place Autocomplete, Place - * Details, and Address Validation requests within a session belong to the - * same Cloud Console project. - * * Be sure to pass a unique session token for each new session. Using the - * same token for more than one session will result in each request being - * billed individually. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.maps.places.v1.Place|Place}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/places.get_place.js - * region_tag:places_v1_generated_Places_GetPlace_async - */ - getPlace( - request?: protos.google.maps.places.v1.IGetPlaceRequest, - options?: CallOptions): - Promise<[ - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|undefined, {}|undefined - ]>; - getPlace( - request: protos.google.maps.places.v1.IGetPlaceRequest, - options: CallOptions, - callback: Callback< - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, - {}|null|undefined>): void; - getPlace( - request: protos.google.maps.places.v1.IGetPlaceRequest, - callback: Callback< - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, - {}|null|undefined>): void; - getPlace( - request?: protos.google.maps.places.v1.IGetPlaceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.maps.places.v1.IPlace, - protos.google.maps.places.v1.IGetPlaceRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.getPlace(request, options, callback); - } -/** - * Returns predictions for the given input. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.input - * Required. The text string on which to search. - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} [request.locationBias] - * Optional. Bias results to a specified location. - * - * At most one of `location_bias` or `location_restriction` should be set. If - * neither are set, the results will be biased by IP address, meaning the IP - * address will be mapped to an imprecise location and used as a biasing - * signal. - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} [request.locationRestriction] - * Optional. Restrict results to a specified location. - * - * At most one of `location_bias` or `location_restriction` should be set. If - * neither are set, the results will be biased by IP address, meaning the IP - * address will be mapped to an imprecise location and used as a biasing - * signal. - * @param {string[]} [request.includedPrimaryTypes] - * Optional. Included primary Place type (for example, "restaurant" or - * "gas_station") in Place Types - * (https://developers.google.com/maps/documentation/places/web-service/place-types), - * or only `(regions)`, or only `(cities)`. A Place is only returned if its - * primary type is included in this list. Up to 5 values can be specified. If - * no types are specified, all Place types are returned. - * @param {string[]} [request.includedRegionCodes] - * Optional. Only include results in the specified regions, specified as up to - * 15 CLDR two-character region codes. An empty set will not restrict the - * results. If both `location_restriction` and `included_region_codes` are - * set, the results will be located in the area of intersection. - * @param {string} [request.languageCode] - * Optional. The language in which to return results. Defaults to en-US. The - * results may be in mixed languages if the language used in `input` is - * different from `language_code` or if the returned Place does not have a - * translation from the local language to `language_code`. - * @param {string} [request.regionCode] - * Optional. The region code, specified as a CLDR two-character region code. - * This affects address formatting, result ranking, and may influence what - * results are returned. This does not restrict results to the specified - * region. To restrict results to a region, use `region_code_restriction`. - * @param {google.type.LatLng} [request.origin] - * Optional. The origin point from which to calculate geodesic distance to the - * destination (returned as `distance_meters`). If this value is omitted, - * geodesic distance will not be returned. - * @param {number} [request.inputOffset] - * Optional. A zero-based Unicode character offset of `input` indicating the - * cursor position in `input`. The cursor position may influence what - * predictions are returned. - * - * If empty, defaults to the length of `input`. - * @param {boolean} [request.includeQueryPredictions] - * Optional. If true, the response will include both Place and query - * predictions. Otherwise the response will only return Place predictions. - * @param {string} [request.sessionToken] - * Optional. A string which identifies an Autocomplete session for billing - * purposes. Must be a URL and filename safe base64 string with at most 36 - * ASCII characters in length. Otherwise an INVALID_ARGUMENT error is - * returned. - * - * The session begins when the user starts typing a query, and concludes when - * they select a place and a call to Place Details or Address Validation is - * made. Each session can have multiple queries, followed by one Place Details - * or Address Validation request. The credentials used for each request within - * a session must belong to the same Google Cloud Console project. Once a - * session has concluded, the token is no longer valid; your app must generate - * a fresh token for each session. If the `session_token` parameter is - * omitted, or if you reuse a session token, the session is charged as if no - * session token was provided (each request is billed separately). - * - * We recommend the following guidelines: - * - * * Use session tokens for all Place Autocomplete calls. - * * Generate a fresh token for each session. Using a version 4 UUID is - * recommended. - * * Ensure that the credentials used for all Place Autocomplete, Place - * Details, and Address Validation requests within a session belong to the - * same Cloud Console project. - * * Be sure to pass a unique session token for each new session. Using the - * same token for more than one session will result in each request being - * billed individually. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.maps.places.v1.AutocompletePlacesResponse|AutocompletePlacesResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/places.autocomplete_places.js - * region_tag:places_v1_generated_Places_AutocompletePlaces_async - */ - autocompletePlaces( - request?: protos.google.maps.places.v1.IAutocompletePlacesRequest, - options?: CallOptions): - Promise<[ - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|undefined, {}|undefined - ]>; - autocompletePlaces( - request: protos.google.maps.places.v1.IAutocompletePlacesRequest, - options: CallOptions, - callback: Callback< - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, - {}|null|undefined>): void; - autocompletePlaces( - request: protos.google.maps.places.v1.IAutocompletePlacesRequest, - callback: Callback< - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, - {}|null|undefined>): void; - autocompletePlaces( - request?: protos.google.maps.places.v1.IAutocompletePlacesRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.maps.places.v1.IAutocompletePlacesResponse, - protos.google.maps.places.v1.IAutocompletePlacesRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - this.initialize(); - return this.innerApiCalls.autocompletePlaces(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified photo resource name string. - * - * @param {string} place - * @param {string} photo - * @returns {string} Resource name string. - */ - photoPath(place:string,photo:string) { - return this.pathTemplates.photoPathTemplate.render({ - place: place, - photo: photo, - }); - } - - /** - * Parse the place from Photo resource. - * - * @param {string} photoName - * A fully-qualified path representing Photo resource. - * @returns {string} A string representing the place. - */ - matchPlaceFromPhotoName(photoName: string) { - return this.pathTemplates.photoPathTemplate.match(photoName).place; - } - - /** - * Parse the photo from Photo resource. - * - * @param {string} photoName - * A fully-qualified path representing Photo resource. - * @returns {string} A string representing the photo. - */ - matchPhotoFromPhotoName(photoName: string) { - return this.pathTemplates.photoPathTemplate.match(photoName).photo; - } - - /** - * Return a fully-qualified photoMedia resource name string. - * - * @param {string} place_id - * @param {string} photo_reference - * @returns {string} Resource name string. - */ - photoMediaPath(placeId:string,photoReference:string) { - return this.pathTemplates.photoMediaPathTemplate.render({ - place_id: placeId, - photo_reference: photoReference, - }); - } - - /** - * Parse the place_id from PhotoMedia resource. - * - * @param {string} photoMediaName - * A fully-qualified path representing PhotoMedia resource. - * @returns {string} A string representing the place_id. - */ - matchPlaceIdFromPhotoMediaName(photoMediaName: string) { - return this.pathTemplates.photoMediaPathTemplate.match(photoMediaName).place_id; - } - - /** - * Parse the photo_reference from PhotoMedia resource. - * - * @param {string} photoMediaName - * A fully-qualified path representing PhotoMedia resource. - * @returns {string} A string representing the photo_reference. - */ - matchPhotoReferenceFromPhotoMediaName(photoMediaName: string) { - return this.pathTemplates.photoMediaPathTemplate.match(photoMediaName).photo_reference; - } - - /** - * Return a fully-qualified place resource name string. - * - * @param {string} place_id - * @returns {string} Resource name string. - */ - placePath(placeId:string) { - return this.pathTemplates.placePathTemplate.render({ - place_id: placeId, - }); - } - - /** - * Parse the place_id from Place resource. - * - * @param {string} placeName - * A fully-qualified path representing Place resource. - * @returns {string} A string representing the place_id. - */ - matchPlaceIdFromPlaceName(placeName: string) { - return this.pathTemplates.placePathTemplate.match(placeName).place_id; - } - - /** - * Return a fully-qualified review resource name string. - * - * @param {string} place - * @param {string} review - * @returns {string} Resource name string. - */ - reviewPath(place:string,review:string) { - return this.pathTemplates.reviewPathTemplate.render({ - place: place, - review: review, - }); - } - - /** - * Parse the place from Review resource. - * - * @param {string} reviewName - * A fully-qualified path representing Review resource. - * @returns {string} A string representing the place. - */ - matchPlaceFromReviewName(reviewName: string) { - return this.pathTemplates.reviewPathTemplate.match(reviewName).place; - } - - /** - * Parse the review from Review resource. - * - * @param {string} reviewName - * A fully-qualified path representing Review resource. - * @returns {string} A string representing the review. - */ - matchReviewFromReviewName(reviewName: string) { - return this.pathTemplates.reviewPathTemplate.match(reviewName).review; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.placesStub && !this._terminated) { - return this.placesStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json b/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json deleted file mode 100644 index 08c314b2f81..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/v1/places_client_config.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "interfaces": { - "google.maps.places.v1.Places": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "SearchNearby": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SearchText": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPhotoMedia": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetPlace": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AutocompletePlaces": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json b/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json deleted file mode 100644 index 241d296eaac..00000000000 --- a/owl-bot-staging/google-maps-places/v1/src/v1/places_proto_list.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - "../../protos/google/geo/type/viewport.proto", - "../../protos/google/maps/places/v1/attribution.proto", - "../../protos/google/maps/places/v1/content_block.proto", - "../../protos/google/maps/places/v1/contextual_content.proto", - "../../protos/google/maps/places/v1/ev_charging.proto", - "../../protos/google/maps/places/v1/fuel_options.proto", - "../../protos/google/maps/places/v1/geometry.proto", - "../../protos/google/maps/places/v1/photo.proto", - "../../protos/google/maps/places/v1/place.proto", - "../../protos/google/maps/places/v1/places_service.proto", - "../../protos/google/maps/places/v1/reference.proto", - "../../protos/google/maps/places/v1/review.proto" -] diff --git a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 43116c49ac8..00000000000 --- a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const places = require('@googlemaps/places'); - -function main() { - const placesClient = new places.PlacesClient(); -} - -main(); diff --git a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index d47881e4df6..00000000000 --- a/owl-bot-staging/google-maps-places/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {PlacesClient} from '@googlemaps/places'; - -// check that the client class type name can be used -function doStuffWithPlacesClient(client: PlacesClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const placesClient = new PlacesClient(); - doStuffWithPlacesClient(placesClient); -} - -main(); diff --git a/owl-bot-staging/google-maps-places/v1/system-test/install.ts b/owl-bot-staging/google-maps-places/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-maps-places/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; - -describe('📦 pack-n-play test', () => { - - it('TypeScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() - } - }; - await packNTest(options); - }); - - it('JavaScript code', async function() { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() - } - }; - await packNTest(options); - }); - -}); diff --git a/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts b/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts deleted file mode 100644 index 8ac58f0cb36..00000000000 --- a/owl-bot-staging/google-maps-places/v1/test/gapic_places_v1.ts +++ /dev/null @@ -1,802 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import {SinonStub} from 'sinon'; -import {describe, it} from 'mocha'; -import * as placesModule from '../src'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -describe('v1.PlacesClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new placesModule.v1.PlacesClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'places.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new placesModule.v1.PlacesClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, "googleapis.com"); - }); - - if (typeof process === 'object' && typeof process.emitWarning === 'function') { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = placesModule.v1.PlacesClient.servicePath; - assert.strictEqual(servicePath, 'places.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = placesModule.v1.PlacesClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'places.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new placesModule.v1.PlacesClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'places.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new placesModule.v1.PlacesClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'places.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new placesModule.v1.PlacesClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'places.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new placesModule.v1.PlacesClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'places.configured.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { new placesModule.v1.PlacesClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = placesModule.v1.PlacesClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new placesModule.v1.PlacesClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new placesModule.v1.PlacesClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.placesStub, undefined); - await client.initialize(); - assert(client.placesStub); - }); - - it('has close method for the initialized client', done => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.placesStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.placesStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error|null, projectId?: string|null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('searchNearby', () => { - it('invokes searchNearby without error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyResponse() - ); - client.innerApiCalls.searchNearby = stubSimpleCall(expectedResponse); - const [response] = await client.searchNearby(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchNearby without error using callback', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyResponse() - ); - client.innerApiCalls.searchNearby = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchNearby( - request, - (err?: Error|null, result?: protos.google.maps.places.v1.ISearchNearbyResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchNearby with error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.searchNearby = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.searchNearby(request), expectedError); - }); - - it('invokes searchNearby with closed client', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchNearbyRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.searchNearby(request), expectedError); - }); - }); - - describe('searchText', () => { - it('invokes searchText without error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextResponse() - ); - client.innerApiCalls.searchText = stubSimpleCall(expectedResponse); - const [response] = await client.searchText(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchText without error using callback', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextResponse() - ); - client.innerApiCalls.searchText = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.searchText( - request, - (err?: Error|null, result?: protos.google.maps.places.v1.ISearchTextResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes searchText with error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.searchText = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.searchText(request), expectedError); - }); - - it('invokes searchText with closed client', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.SearchTextRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.searchText(request), expectedError); - }); - }); - - describe('getPhotoMedia', () => { - it('invokes getPhotoMedia without error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPhotoMediaRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.PhotoMedia() - ); - client.innerApiCalls.getPhotoMedia = stubSimpleCall(expectedResponse); - const [response] = await client.getPhotoMedia(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPhotoMedia without error using callback', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPhotoMediaRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.PhotoMedia() - ); - client.innerApiCalls.getPhotoMedia = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPhotoMedia( - request, - (err?: Error|null, result?: protos.google.maps.places.v1.IPhotoMedia|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPhotoMedia with error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPhotoMediaRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPhotoMedia = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPhotoMedia(request), expectedError); - const actualRequest = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPhotoMedia as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPhotoMedia with closed client', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPhotoMediaRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPhotoMediaRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPhotoMedia(request), expectedError); - }); - }); - - describe('getPlace', () => { - it('invokes getPlace without error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPlaceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.Place() - ); - client.innerApiCalls.getPlace = stubSimpleCall(expectedResponse); - const [response] = await client.getPlace(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPlace without error using callback', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPlaceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.Place() - ); - client.innerApiCalls.getPlace = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getPlace( - request, - (err?: Error|null, result?: protos.google.maps.places.v1.IPlace|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPlace with error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPlaceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getPlace = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getPlace(request), expectedError); - const actualRequest = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getPlace as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getPlace with closed client', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.GetPlaceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.maps.places.v1.GetPlaceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getPlace(request), expectedError); - }); - }); - - describe('autocompletePlaces', () => { - it('invokes autocompletePlaces without error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesResponse() - ); - client.innerApiCalls.autocompletePlaces = stubSimpleCall(expectedResponse); - const [response] = await client.autocompletePlaces(request); - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes autocompletePlaces without error using callback', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesResponse() - ); - client.innerApiCalls.autocompletePlaces = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.autocompletePlaces( - request, - (err?: Error|null, result?: protos.google.maps.places.v1.IAutocompletePlacesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - }); - - it('invokes autocompletePlaces with error', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesRequest() - ); - const expectedError = new Error('expected'); - client.innerApiCalls.autocompletePlaces = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.autocompletePlaces(request), expectedError); - }); - - it('invokes autocompletePlaces with closed client', async () => { - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.maps.places.v1.AutocompletePlacesRequest() - ); - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.autocompletePlaces(request), expectedError); - }); - }); - - describe('Path templates', () => { - - describe('photo', () => { - const fakePath = "/rendered/path/photo"; - const expectedParameters = { - place: "placeValue", - photo: "photoValue", - }; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.photoPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.photoPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('photoPath', () => { - const result = client.photoPath("placeValue", "photoValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.photoPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPlaceFromPhotoName', () => { - const result = client.matchPlaceFromPhotoName(fakePath); - assert.strictEqual(result, "placeValue"); - assert((client.pathTemplates.photoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPhotoFromPhotoName', () => { - const result = client.matchPhotoFromPhotoName(fakePath); - assert.strictEqual(result, "photoValue"); - assert((client.pathTemplates.photoPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('photoMedia', () => { - const fakePath = "/rendered/path/photoMedia"; - const expectedParameters = { - place_id: "placeIdValue", - photo_reference: "photoReferenceValue", - }; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.photoMediaPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.photoMediaPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('photoMediaPath', () => { - const result = client.photoMediaPath("placeIdValue", "photoReferenceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.photoMediaPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPlaceIdFromPhotoMediaName', () => { - const result = client.matchPlaceIdFromPhotoMediaName(fakePath); - assert.strictEqual(result, "placeIdValue"); - assert((client.pathTemplates.photoMediaPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchPhotoReferenceFromPhotoMediaName', () => { - const result = client.matchPhotoReferenceFromPhotoMediaName(fakePath); - assert.strictEqual(result, "photoReferenceValue"); - assert((client.pathTemplates.photoMediaPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('place', () => { - const fakePath = "/rendered/path/place"; - const expectedParameters = { - place_id: "placeIdValue", - }; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.placePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.placePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('placePath', () => { - const result = client.placePath("placeIdValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.placePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPlaceIdFromPlaceName', () => { - const result = client.matchPlaceIdFromPlaceName(fakePath); - assert.strictEqual(result, "placeIdValue"); - assert((client.pathTemplates.placePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('review', () => { - const fakePath = "/rendered/path/review"; - const expectedParameters = { - place: "placeValue", - review: "reviewValue", - }; - const client = new placesModule.v1.PlacesClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.reviewPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.reviewPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('reviewPath', () => { - const result = client.reviewPath("placeValue", "reviewValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.reviewPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchPlaceFromReviewName', () => { - const result = client.matchPlaceFromReviewName(fakePath); - assert.strictEqual(result, "placeValue"); - assert((client.pathTemplates.reviewPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchReviewFromReviewName', () => { - const result = client.matchReviewFromReviewName(fakePath); - assert.strictEqual(result, "reviewValue"); - assert((client.pathTemplates.reviewPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-maps-places/v1/tsconfig.json b/owl-bot-staging/google-maps-places/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-maps-places/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-maps-places/v1/webpack.config.js b/owl-bot-staging/google-maps-places/v1/webpack.config.js deleted file mode 100644 index 6f1933d317a..00000000000 --- a/owl-bot-staging/google-maps-places/v1/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'Places', - filename: './places.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto b/packages/google-maps-places/protos/google/maps/places/v1/content_block.proto similarity index 100% rename from owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/content_block.proto rename to packages/google-maps-places/protos/google/maps/places/v1/content_block.proto diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto b/packages/google-maps-places/protos/google/maps/places/v1/contextual_content.proto similarity index 100% rename from owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/contextual_content.proto rename to packages/google-maps-places/protos/google/maps/places/v1/contextual_content.proto diff --git a/packages/google-maps-places/protos/google/maps/places/v1/place.proto b/packages/google-maps-places/protos/google/maps/places/v1/place.proto index 3fbf76e5ae5..47e8206acce 100644 --- a/packages/google-maps-places/protos/google/maps/places/v1/place.proto +++ b/packages/google-maps-places/protos/google/maps/places/v1/place.proto @@ -18,9 +18,11 @@ package google.maps.places.v1; import "google/api/resource.proto"; import "google/geo/type/viewport.proto"; +import "google/maps/places/v1/content_block.proto"; import "google/maps/places/v1/ev_charging.proto"; import "google/maps/places/v1/fuel_options.proto"; import "google/maps/places/v1/photo.proto"; +import "google/maps/places/v1/reference.proto"; import "google/maps/places/v1/review.proto"; import "google/type/date.proto"; import "google/type/latlng.proto"; @@ -283,6 +285,33 @@ message Place { optional bool wheelchair_accessible_seating = 4; } + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the place. + message GenerativeSummary { + // The overview of the place. + google.type.LocalizedText overview = 1; + + // The detailed description of the place. + google.type.LocalizedText description = 2; + + // References that are used to generate the summary description. + References references = 3; + } + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the area that the place is in. + message AreaSummary { + // Content blocks that compose the area summary. Each block has a separate + // topic about the area. + repeated ContentBlock content_blocks = 4; + } + // This Place's resource name, in `places/{place_id}` format. Can be used to // look up the Place. string name = 1; @@ -517,6 +546,20 @@ message Place { // Information of ev charging options. EVChargeOptions ev_charge_options = 79; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the place. + GenerativeSummary generative_summary = 80; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // AI-generated summary of the area that the place is in. + AreaSummary area_summary = 81; } // Price level of the place. diff --git a/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto b/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto index 947ee1040e9..ea9f82aa2e0 100644 --- a/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto +++ b/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/geo/type/viewport.proto"; +import "google/maps/places/v1/contextual_content.proto"; import "google/maps/places/v1/ev_charging.proto"; import "google/maps/places/v1/geometry.proto"; import "google/maps/places/v1/place.proto"; @@ -371,6 +372,19 @@ message SearchTextRequest { message SearchTextResponse { // A list of places that meet the user's text search criteria. repeated Place places = 1; + + // Experimental: See + // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative + // for more details. + // + // A list of contextual contents where each entry associates to the + // corresponding place in the same index in the places field. The contents + // that are relevant to the `text_query` in the request are preferred. If the + // contextual content is not available for one of the places, it will return + // non-contextual content. It will be empty only when the content is + // unavailable for this place. This list should have as many entries as the + // list of places if requested. + repeated ContextualContent contextual_contents = 3; } // Request for fetching a photo of a place using a photo resource name. @@ -542,11 +556,11 @@ message AutocompletePlacesRequest { [(google.api.field_behavior) = OPTIONAL]; // Optional. Included primary Place type (for example, "restaurant" or - // "gas_station") from - // https://developers.google.com/maps/documentation/places/web-service/place-types. - // A Place is only returned if its primary type is included in this list. Up - // to 5 values can be specified. If no types are specified, all Place types - // are returned. + // "gas_station") in Place Types + // (https://developers.google.com/maps/documentation/places/web-service/place-types), + // or only `(regions)`, or only `(cities)`. A Place is only returned if its + // primary type is included in this list. Up to 5 values can be specified. If + // no types are specified, all Place types are returned. repeated string included_primary_types = 4 [(google.api.field_behavior) = OPTIONAL]; diff --git a/owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto b/packages/google-maps-places/protos/google/maps/places/v1/reference.proto similarity index 100% rename from owl-bot-staging/google-maps-places/v1/protos/google/maps/places/v1/reference.proto rename to packages/google-maps-places/protos/google/maps/places/v1/reference.proto diff --git a/packages/google-maps-places/protos/protos.d.ts b/packages/google-maps-places/protos/protos.d.ts index 6cafed65515..2d874e7ab03 100644 --- a/packages/google-maps-places/protos/protos.d.ts +++ b/packages/google-maps-places/protos/protos.d.ts @@ -17,12315 +17,13396 @@ import Long = require("long"); /** Namespace google. */ export namespace google { - /** Namespace protobuf. */ - namespace protobuf { + /** Namespace geo. */ + namespace geo { - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Namespace type. */ + namespace type { - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Properties of a Viewport. */ + interface IViewport { - /** Timestamp nanos */ - nanos?: (number|null); + /** Viewport low */ + low?: (google.type.ILatLng|null); + + /** Viewport high */ + high?: (google.type.ILatLng|null); + } + + /** Represents a Viewport. */ + class Viewport implements IViewport { + + /** + * Constructs a new Viewport. + * @param [properties] Properties to set + */ + constructor(properties?: google.geo.type.IViewport); + + /** Viewport low. */ + public low?: (google.type.ILatLng|null); + + /** Viewport high. */ + public high?: (google.type.ILatLng|null); + + /** + * Creates a new Viewport instance using the specified properties. + * @param [properties] Properties to set + * @returns Viewport instance + */ + public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport; + + /** + * Verifies a Viewport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Viewport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Viewport + */ + public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @param message Viewport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Viewport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Viewport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } + } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Namespace type. */ + namespace type { + + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); + } + + /** Represents a LatLng. */ + class LatLng implements ILatLng { /** - * Constructs a new Timestamp. + * Constructs a new LatLng. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.type.ILatLng); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** LatLng latitude. */ + public latitude: number; - /** Timestamp nanos. */ - public nanos: number; + /** LatLng longitude. */ + public longitude: number; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new LatLng instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns LatLng instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.type.ILatLng): google.type.LatLng; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a LatLng message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns LatLng * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a LatLng message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns LatLng * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng; /** - * Verifies a Timestamp message. + * Verifies a LatLng message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns LatLng */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.type.LatLng; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this LatLng to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Timestamp + * Gets the default type url for LatLng * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** Properties of a LocalizedText. */ + interface ILocalizedText { - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** LocalizedText text */ + text?: (string|null); + + /** LocalizedText languageCode */ + languageCode?: (string|null); } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents a LocalizedText. */ + class LocalizedText implements ILocalizedText { /** - * Constructs a new FileDescriptorSet. + * Constructs a new LocalizedText. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + constructor(properties?: google.type.ILocalizedText); - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** LocalizedText text. */ + public text: string; + + /** LocalizedText languageCode. */ + public languageCode: string; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new LocalizedText instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns LocalizedText instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.type.ILocalizedText): google.type.LocalizedText; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a LocalizedText message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorSet + * @returns LocalizedText * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LocalizedText; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @returns LocalizedText * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LocalizedText; /** - * Verifies a FileDescriptorSet message. + * Verifies a LocalizedText message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns LocalizedText */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.type.LocalizedText; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. + * @param message LocalizedText * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.LocalizedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this LocalizedText to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for LocalizedText * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** Properties of a Money. */ + interface IMoney { - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Money currencyCode */ + currencyCode?: (string|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** Money units */ + units?: (number|Long|string|null); - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** Money nanos */ + nanos?: (number|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a Money. */ + class Money implements IMoney { /** - * Constructs a new FileDescriptorProto. + * Constructs a new Money. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + constructor(properties?: google.type.IMoney); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Money currencyCode. */ + public currencyCode: string; - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Money units. */ + public units: (number|Long|string); - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** Money nanos. */ + public nanos: number; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new Money instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns Money instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.type.IMoney): google.type.Money; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. + * @param message Money message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a Money message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorProto + * @returns Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Money; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a Money message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @returns Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Money; /** - * Verifies a FileDescriptorProto message. + * Verifies a Money message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Money message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns Money */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.type.Money; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a Money message. Also converts values to other types if specified. + * @param message Money * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Money to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for Money * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** Properties of a Date. */ + interface IDate { - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** Date year */ + year?: (number|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** Date month */ + month?: (number|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** Date day */ + day?: (number|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a Date. */ + class Date implements IDate { /** - * Constructs a new DescriptorProto. + * Constructs a new Date. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + constructor(properties?: google.type.IDate); - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** Date year. */ + public year: number; - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** Date month. */ + public month: number; - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** Date day. */ + public day: number; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new Date instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns Date instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.type.IDate): google.type.Date; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DescriptorProto + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DescriptorProto + * @returns Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; /** - * Verifies a DescriptorProto message. + * Verifies a Date message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns Date */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.type.Date; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this Date to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for Date * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace DescriptorProto { + /** Namespace maps. */ + namespace maps { - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** Namespace places. */ + namespace places { - /** ExtensionRange start */ - start?: (number|null); + /** Namespace v1. */ + namespace v1 { - /** ExtensionRange end */ - end?: (number|null); + /** Properties of an AuthorAttribution. */ + interface IAuthorAttribution { - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** AuthorAttribution displayName */ + displayName?: (string|null); - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** AuthorAttribution uri */ + uri?: (string|null); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** AuthorAttribution photoUri */ + photoUri?: (string|null); + } - /** ExtensionRange start. */ - public start: number; + /** Represents an AuthorAttribution. */ + class AuthorAttribution implements IAuthorAttribution { - /** ExtensionRange end. */ - public end: number; + /** + * Constructs a new AuthorAttribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAuthorAttribution); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** AuthorAttribution displayName. */ + public displayName: string; - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + /** AuthorAttribution uri. */ + public uri: string; - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** AuthorAttribution photoUri. */ + public photoUri: string; - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new AuthorAttribution instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthorAttribution instance + */ + public static create(properties?: google.maps.places.v1.IAuthorAttribution): google.maps.places.v1.AuthorAttribution; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + /** + * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @param message AuthorAttribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + /** + * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @param message AuthorAttribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an AuthorAttribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AuthorAttribution; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** + * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AuthorAttribution; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an AuthorAttribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthorAttribution + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AuthorAttribution; - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. + * @param message AuthorAttribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AuthorAttribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** + * Converts this AuthorAttribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReservedRange start */ - start?: (number|null); + /** + * Gets the default type url for AuthorAttribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ReservedRange end */ - end?: (number|null); - } + /** Properties of a ContentBlock. */ + interface IContentBlock { - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** ContentBlock topic */ + topic?: (string|null); - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** ContentBlock content */ + content?: (google.type.ILocalizedText|null); - /** ReservedRange start. */ - public start: number; + /** ContentBlock references */ + references?: (google.maps.places.v1.IReferences|null); + } - /** ReservedRange end. */ - public end: number; + /** Represents a ContentBlock. */ + class ContentBlock implements IContentBlock { - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + /** + * Constructs a new ContentBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IContentBlock); - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** ContentBlock topic. */ + public topic: string; - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** ContentBlock content. */ + public content?: (google.type.ILocalizedText|null); - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + /** ContentBlock references. */ + public references?: (google.maps.places.v1.IReferences|null); - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a new ContentBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentBlock instance + */ + public static create(properties?: google.maps.places.v1.IContentBlock): google.maps.places.v1.ContentBlock; - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @param message ContentBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + /** + * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @param message ContentBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IContentBlock, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ContentBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContentBlock; - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ContentBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContentBlock; - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Verifies a ContentBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** + * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentBlock + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContentBlock; - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. + * @param message ContentBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContentBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + /** + * Converts this ContentBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** + * Gets the default type url for ContentBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } + /** Properties of a References. */ + interface IReferences { - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** References reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + /** References places */ + places?: (string[]|null); + } - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Represents a References. */ + class References implements IReferences { - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + /** + * Constructs a new References. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IReferences); - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** References reviews. */ + public reviews: google.maps.places.v1.IReview[]; - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + /** References places. */ + public places: string[]; - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + /** + * Creates a new References instance using the specified properties. + * @param [properties] Properties to set + * @returns References instance + */ + public static create(properties?: google.maps.places.v1.IReferences): google.maps.places.v1.References; - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @param message References message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @param message References message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IReferences, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + /** + * Decodes a References message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.References; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + /** + * Decodes a References message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.References; - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a References message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + /** + * Creates a References message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns References + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.References; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a References message. Also converts values to other types if specified. + * @param message References + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.References, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this References to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for References + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - namespace ExtensionRangeOptions { + /** Properties of a Review. */ + interface IReview { - /** Properties of a Declaration. */ - interface IDeclaration { + /** Review name */ + name?: (string|null); - /** Declaration number */ - number?: (number|null); + /** Review relativePublishTimeDescription */ + relativePublishTimeDescription?: (string|null); - /** Declaration fullName */ - fullName?: (string|null); + /** Review text */ + text?: (google.type.ILocalizedText|null); - /** Declaration type */ - type?: (string|null); + /** Review originalText */ + originalText?: (google.type.ILocalizedText|null); - /** Declaration reserved */ - reserved?: (boolean|null); + /** Review rating */ + rating?: (number|null); - /** Declaration repeated */ - repeated?: (boolean|null); - } + /** Review authorAttribution */ + authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); - /** Represents a Declaration. */ - class Declaration implements IDeclaration { + /** Review publishTime */ + publishTime?: (google.protobuf.ITimestamp|null); + } - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + /** Represents a Review. */ + class Review implements IReview { - /** Declaration number. */ - public number: number; + /** + * Constructs a new Review. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IReview); - /** Declaration fullName. */ - public fullName: string; + /** Review name. */ + public name: string; - /** Declaration type. */ - public type: string; + /** Review relativePublishTimeDescription. */ + public relativePublishTimeDescription: string; - /** Declaration reserved. */ - public reserved: boolean; + /** Review text. */ + public text?: (google.type.ILocalizedText|null); - /** Declaration repeated. */ - public repeated: boolean; + /** Review originalText. */ + public originalText?: (google.type.ILocalizedText|null); - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + /** Review rating. */ + public rating: number; - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + /** Review authorAttribution. */ + public authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + /** Review publishTime. */ + public publishTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + /** + * Creates a new Review instance using the specified properties. + * @param [properties] Properties to set + * @returns Review instance + */ + public static create(properties?: google.maps.places.v1.IReview): google.maps.places.v1.Review; - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + /** + * Decodes a Review message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Review; - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Review; - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a Review message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a Review message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Review + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Review; - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @param message Review + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Review, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** + * Converts this Review to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for Review + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto number */ - number?: (number|null); + /** Properties of a ContextualContent. */ + interface IContextualContent { - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** ContextualContent reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** ContextualContent photos */ + photos?: (google.maps.places.v1.IPhoto[]|null); - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** ContextualContent justifications */ + justifications?: (google.maps.places.v1.ContextualContent.IJustification[]|null); + } - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** Represents a ContextualContent. */ + class ContextualContent implements IContextualContent { - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * Constructs a new ContextualContent. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IContextualContent); - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** ContextualContent reviews. */ + public reviews: google.maps.places.v1.IReview[]; - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** ContextualContent photos. */ + public photos: google.maps.places.v1.IPhoto[]; - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** ContextualContent justifications. */ + public justifications: google.maps.places.v1.ContextualContent.IJustification[]; - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** + * Creates a new ContextualContent instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextualContent instance + */ + public static create(properties?: google.maps.places.v1.IContextualContent): google.maps.places.v1.ContextualContent; - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** + * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @param message ContextualContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + /** + * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @param message ContextualContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IContextualContent, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldDescriptorProto name. */ - public name: string; + /** + * Decodes a ContextualContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent; - /** FieldDescriptorProto number. */ - public number: number; + /** + * Decodes a ContextualContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent; - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** + * Verifies a ContextualContent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** + * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextualContent + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. + * @param message ContextualContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** + * Converts this ContextualContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** + * Gets the default type url for ContextualContent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + namespace ContextualContent { - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** Properties of a Justification. */ + interface IJustification { - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** Justification reviewJustification */ + reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** Justification businessAvailabilityAttributesJustification */ + businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); + } - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + /** Represents a Justification. */ + class Justification implements IJustification { - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Justification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.IJustification); - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Justification reviewJustification. */ + public reviewJustification?: (google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null); - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + /** Justification businessAvailabilityAttributesJustification. */ + public businessAvailabilityAttributesJustification?: (google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null); - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + /** Justification justification. */ + public justification?: ("reviewJustification"|"businessAvailabilityAttributesJustification"); - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new Justification instance using the specified properties. + * @param [properties] Properties to set + * @returns Justification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.IJustification): google.maps.places.v1.ContextualContent.Justification; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + /** + * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @param message Justification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @param message Justification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.IJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a Justification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification; - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a Justification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification; - namespace FieldDescriptorProto { + /** + * Verifies a Justification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } + /** + * Creates a Justification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Justification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification; - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } + /** + * Creates a plain object from a Justification message. Also converts values to other types if specified. + * @param message Justification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** + * Converts this Justification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** OneofDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for Justification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } + namespace Justification { - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Properties of a ReviewJustification. */ + interface IReviewJustification { - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + /** ReviewJustification highlightedText */ + highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); - /** OneofDescriptorProto name. */ - public name: string; + /** ReviewJustification review */ + review?: (google.maps.places.v1.IReview|null); + } - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** Represents a ReviewJustification. */ + class ReviewJustification implements IReviewJustification { - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + /** + * Constructs a new ReviewJustification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification); - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReviewJustification highlightedText. */ + public highlightedText?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null); - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ReviewJustification review. */ + public review?: (google.maps.places.v1.IReview|null); - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + /** + * Creates a new ReviewJustification instance using the specified properties. + * @param [properties] Properties to set + * @returns ReviewJustification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IReviewJustification): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @param message ReviewJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + /** + * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @param message ReviewJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IReviewJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ReviewJustification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a ReviewJustification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + /** + * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReviewJustification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification; - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. + * @param message ReviewJustification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** + * Converts this ReviewJustification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** + * Gets the default type url for ReviewJustification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + namespace ReviewJustification { - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } + /** Properties of a HighlightedText. */ + interface IHighlightedText { - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** HighlightedText text */ + text?: (string|null); - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + /** HighlightedText highlightedTextRanges */ + highlightedTextRanges?: (google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]|null); + } - /** EnumDescriptorProto name. */ - public name: string; + /** Represents a HighlightedText. */ + class HighlightedText implements IHighlightedText { - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** + * Constructs a new HighlightedText. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** HighlightedText text. */ + public text: string; - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** HighlightedText highlightedTextRanges. */ + public highlightedTextRanges: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange[]; - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** + * Creates a new HighlightedText instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlightedText instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + /** + * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @param message HighlightedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @param message HighlightedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a HighlightedText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + /** + * Decodes a HighlightedText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + /** + * Verifies a HighlightedText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HighlightedText + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + /** + * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. + * @param message HighlightedText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this HighlightedText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for HighlightedText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + namespace HighlightedText { + + /** Properties of a HighlightedTextRange. */ + interface IHighlightedTextRange { + + /** HighlightedTextRange startIndex */ + startIndex?: (number|null); + + /** HighlightedTextRange endIndex */ + endIndex?: (number|null); + } + + /** Represents a HighlightedTextRange. */ + class HighlightedTextRange implements IHighlightedTextRange { + + /** + * Constructs a new HighlightedTextRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange); + + /** HighlightedTextRange startIndex. */ + public startIndex: number; + + /** HighlightedTextRange endIndex. */ + public endIndex: number; + + /** + * Creates a new HighlightedTextRange instance using the specified properties. + * @param [properties] Properties to set + * @returns HighlightedTextRange instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @param message HighlightedTextRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @param message HighlightedTextRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Verifies a HighlightedTextRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HighlightedTextRange + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange; + + /** + * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. + * @param message HighlightedTextRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HighlightedTextRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HighlightedTextRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } - namespace EnumDescriptorProto { + /** Properties of a BusinessAvailabilityAttributesJustification. */ + interface IBusinessAvailabilityAttributesJustification { - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** BusinessAvailabilityAttributesJustification takeout */ + takeout?: (boolean|null); - /** EnumReservedRange start */ - start?: (number|null); + /** BusinessAvailabilityAttributesJustification delivery */ + delivery?: (boolean|null); - /** EnumReservedRange end */ - end?: (number|null); - } + /** BusinessAvailabilityAttributesJustification dineIn */ + dineIn?: (boolean|null); + } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a BusinessAvailabilityAttributesJustification. */ + class BusinessAvailabilityAttributesJustification implements IBusinessAvailabilityAttributesJustification { - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + /** + * Constructs a new BusinessAvailabilityAttributesJustification. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification); - /** EnumReservedRange start. */ - public start: number; + /** BusinessAvailabilityAttributesJustification takeout. */ + public takeout: boolean; - /** EnumReservedRange end. */ - public end: number; + /** BusinessAvailabilityAttributesJustification delivery. */ + public delivery: boolean; - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** BusinessAvailabilityAttributesJustification dineIn. */ + public dineIn: boolean; - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. + * @param [properties] Properties to set + * @returns BusinessAvailabilityAttributesJustification instance + */ + public static create(properties?: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @param message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @param message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a BusinessAvailabilityAttributesJustification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BusinessAvailabilityAttributesJustification + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification; - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. + * @param message BusinessAvailabilityAttributesJustification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** + * Converts this BusinessAvailabilityAttributesJustification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for BusinessAvailabilityAttributesJustification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** Properties of a Photo. */ + interface IPhoto { - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** Photo name */ + name?: (string|null); - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Photo widthPx */ + widthPx?: (number|null); - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** Photo heightPx */ + heightPx?: (number|null); - /** EnumValueDescriptorProto name. */ - public name: string; + /** Photo authorAttributions */ + authorAttributions?: (google.maps.places.v1.IAuthorAttribution[]|null); + } - /** EnumValueDescriptorProto number. */ - public number: number; + /** Represents a Photo. */ + class Photo implements IPhoto { - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** + * Constructs a new Photo. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPhoto); - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + /** Photo name. */ + public name: string; - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Photo widthPx. */ + public widthPx: number; - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** Photo heightPx. */ + public heightPx: number; - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + /** Photo authorAttributions. */ + public authorAttributions: google.maps.places.v1.IAuthorAttribution[]; - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + /** + * Creates a new Photo instance using the specified properties. + * @param [properties] Properties to set + * @returns Photo instance + */ + public static create(properties?: google.maps.places.v1.IPhoto): google.maps.places.v1.Photo; - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @param message Photo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + /** + * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @param message Photo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Photo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Photo; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a Photo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Photo; - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * Verifies a Photo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ServiceDescriptorProto name */ - name?: (string|null); + /** + * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Photo + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Photo; - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** + * Creates a plain object from a Photo message. Also converts values to other types if specified. + * @param message Photo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Photo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** + * Converts this Photo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** + * Gets the default type url for Photo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** Properties of a EVChargeOptions. */ + interface IEVChargeOptions { - /** ServiceDescriptorProto name. */ - public name: string; + /** EVChargeOptions connectorCount */ + connectorCount?: (number|null); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** EVChargeOptions connectorAggregation */ + connectorAggregation?: (google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]|null); + } - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** Represents a EVChargeOptions. */ + class EVChargeOptions implements IEVChargeOptions { - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + /** + * Constructs a new EVChargeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IEVChargeOptions); - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** EVChargeOptions connectorCount. */ + public connectorCount: number; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** EVChargeOptions connectorAggregation. */ + public connectorAggregation: google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + /** + * Creates a new EVChargeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EVChargeOptions instance + */ + public static create(properties?: google.maps.places.v1.IEVChargeOptions): google.maps.places.v1.EVChargeOptions; - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + /** + * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @param message EVChargeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @param message EVChargeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + /** + * Decodes a EVChargeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions; - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a EVChargeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EVChargeOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions; - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** + * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. + * @param message EVChargeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.EVChargeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodDescriptorProto name */ - name?: (string|null); + /** + * Converts this EVChargeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** + * Gets the default type url for EVChargeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + namespace EVChargeOptions { - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** Properties of a ConnectorAggregation. */ + interface IConnectorAggregation { - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** ConnectorAggregation type */ + type?: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** ConnectorAggregation maxChargeRateKw */ + maxChargeRateKw?: (number|null); - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** ConnectorAggregation count */ + count?: (number|null); - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** ConnectorAggregation availableCount */ + availableCount?: (number|null); - /** MethodDescriptorProto name. */ - public name: string; + /** ConnectorAggregation outOfServiceCount */ + outOfServiceCount?: (number|null); - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** ConnectorAggregation availabilityLastUpdateTime */ + availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); + } - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** Represents a ConnectorAggregation. */ + class ConnectorAggregation implements IConnectorAggregation { - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** + * Constructs a new ConnectorAggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation); - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** ConnectorAggregation type. */ + public type: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** ConnectorAggregation maxChargeRateKw. */ + public maxChargeRateKw: number; - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + /** ConnectorAggregation count. */ + public count: number; - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConnectorAggregation availableCount. */ + public availableCount?: (number|null); - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConnectorAggregation outOfServiceCount. */ + public outOfServiceCount?: (number|null); - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + /** ConnectorAggregation availabilityLastUpdateTime. */ + public availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + /** ConnectorAggregation _availableCount. */ + public _availableCount?: "availableCount"; - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ConnectorAggregation _outOfServiceCount. */ + public _outOfServiceCount?: "outOfServiceCount"; - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + /** + * Creates a new ConnectorAggregation instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectorAggregation instance + */ + public static create(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @param message ConnectorAggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @param message ConnectorAggregation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - /** Properties of a FileOptions. */ - interface IFileOptions { + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** + * Verifies a ConnectorAggregation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** + * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectorAggregation + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** + * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. + * @param message ConnectorAggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.EVChargeOptions.ConnectorAggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** + * Converts this ConnectorAggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** + * Gets the default type url for ConnectorAggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + /** EVConnectorType enum. */ + enum EVConnectorType { + EV_CONNECTOR_TYPE_UNSPECIFIED = 0, + EV_CONNECTOR_TYPE_OTHER = 1, + EV_CONNECTOR_TYPE_J1772 = 2, + EV_CONNECTOR_TYPE_TYPE_2 = 3, + EV_CONNECTOR_TYPE_CHADEMO = 4, + EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5, + EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6, + EV_CONNECTOR_TYPE_TESLA = 7, + EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8, + EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9 + } - /** FileOptions goPackage */ - goPackage?: (string|null); + /** Properties of a FuelOptions. */ + interface IFuelOptions { - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** FuelOptions fuelPrices */ + fuelPrices?: (google.maps.places.v1.FuelOptions.IFuelPrice[]|null); + } - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** Represents a FuelOptions. */ + class FuelOptions implements IFuelOptions { - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** + * Constructs a new FuelOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IFuelOptions); - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** FuelOptions fuelPrices. */ + public fuelPrices: google.maps.places.v1.FuelOptions.IFuelPrice[]; - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** + * Creates a new FuelOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FuelOptions instance + */ + public static create(properties?: google.maps.places.v1.IFuelOptions): google.maps.places.v1.FuelOptions; - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** + * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @param message FuelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** + * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @param message FuelOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); + /** + * Decodes a FuelOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions; - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); + /** + * Decodes a FuelOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions; - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); + /** + * Verifies a FuelOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); + /** + * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FuelOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions; - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); + /** + * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. + * @param message FuelOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.FuelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** + * Converts this FuelOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Gets the default type url for FuelOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + namespace FuelOptions { - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** Properties of a FuelPrice. */ + interface IFuelPrice { - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** FuelPrice type */ + type?: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null); - /** FileOptions javaPackage. */ - public javaPackage: string; + /** FuelPrice price */ + price?: (google.type.IMoney|null); - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** FuelPrice updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** Represents a FuelPrice. */ + class FuelPrice implements IFuelPrice { - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** + * Constructs a new FuelPrice. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.FuelOptions.IFuelPrice); - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** FuelPrice type. */ + public type: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** FuelPrice price. */ + public price?: (google.type.IMoney|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** FuelPrice updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * Creates a new FuelPrice instance using the specified properties. + * @param [properties] Properties to set + * @returns FuelPrice instance + */ + public static create(properties?: google.maps.places.v1.FuelOptions.IFuelPrice): google.maps.places.v1.FuelOptions.FuelPrice; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @param message FuelPrice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @param message FuelPrice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a FuelPrice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions.FuelPrice; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions.FuelPrice; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Verifies a FuelPrice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FuelPrice + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions.FuelPrice; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. + * @param message FuelPrice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.FuelOptions.FuelPrice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * Converts this FuelPrice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** + * Gets the default type url for FuelPrice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + namespace FuelPrice { - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** FuelType enum. */ + enum FuelType { + FUEL_TYPE_UNSPECIFIED = 0, + DIESEL = 1, + REGULAR_UNLEADED = 2, + MIDGRADE = 3, + PREMIUM = 4, + SP91 = 5, + SP91_E10 = 6, + SP92 = 7, + SP95 = 8, + SP95_E10 = 9, + SP98 = 10, + SP99 = 11, + SP100 = 12, + LPG = 13, + E80 = 14, + E85 = 15, + METHANE = 16, + BIO_DIESEL = 17, + TRUCK_DIESEL = 18 + } + } + } - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Properties of a Circle. */ + interface ICircle { - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Circle center */ + center?: (google.type.ILatLng|null); - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + /** Circle radius */ + radius?: (number|null); + } - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a Circle. */ + class Circle implements ICircle { - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Circle. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ICircle); - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + /** Circle center. */ + public center?: (google.type.ILatLng|null); - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + /** Circle radius. */ + public radius: number; - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new Circle instance using the specified properties. + * @param [properties] Properties to set + * @returns Circle instance + */ + public static create(properties?: google.maps.places.v1.ICircle): google.maps.places.v1.Circle; - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a Circle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Circle; - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Circle; - namespace FileOptions { + /** + * Verifies a Circle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } + /** + * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Circle + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Circle; - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @param message Circle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Circle, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Converts this Circle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** + * Gets the default type url for Circle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a Place. */ + interface IPlace { - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Place name */ + name?: (string|null); - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** Place id */ + id?: (string|null); - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place displayName */ + displayName?: (google.type.ILocalizedText|null); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Place types */ + types?: (string[]|null); - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** Place primaryType */ + primaryType?: (string|null); - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** Place primaryTypeDisplayName */ + primaryTypeDisplayName?: (google.type.ILocalizedText|null); - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** Place nationalPhoneNumber */ + nationalPhoneNumber?: (string|null); - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** Place internationalPhoneNumber */ + internationalPhoneNumber?: (string|null); - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** Place formattedAddress */ + formattedAddress?: (string|null); - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** Place shortFormattedAddress */ + shortFormattedAddress?: (string|null); - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** Place addressComponents */ + addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null); - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** Place plusCode */ + plusCode?: (google.maps.places.v1.Place.IPlusCode|null); - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Place location */ + location?: (google.type.ILatLng|null); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Place viewport */ + viewport?: (google.geo.type.IViewport|null); - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + /** Place rating */ + rating?: (number|null); - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place googleMapsUri */ + googleMapsUri?: (string|null); - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place websiteUri */ + websiteUri?: (string|null); - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + /** Place reviews */ + reviews?: (google.maps.places.v1.IReview[]|null); - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + /** Place regularOpeningHours */ + regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place utcOffsetMinutes */ + utcOffsetMinutes?: (number|null); - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + /** Place photos */ + photos?: (google.maps.places.v1.IPhoto[]|null); - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place adrFormatAddress */ + adrFormatAddress?: (string|null); - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Place businessStatus */ + businessStatus?: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus|null); - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Place priceLevel */ + priceLevel?: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel|null); - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** Place attributions */ + attributions?: (google.maps.places.v1.Place.IAttribution[]|null); - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** Place userRatingCount */ + userRatingCount?: (number|null); - /** FieldOptions packed */ - packed?: (boolean|null); + /** Place iconMaskBaseUri */ + iconMaskBaseUri?: (string|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Place iconBackgroundColor */ + iconBackgroundColor?: (string|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** Place takeout */ + takeout?: (boolean|null); - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); + /** Place delivery */ + delivery?: (boolean|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Place dineIn */ + dineIn?: (boolean|null); - /** FieldOptions weak */ - weak?: (boolean|null); + /** Place curbsidePickup */ + curbsidePickup?: (boolean|null); - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); + /** Place reservable */ + reservable?: (boolean|null); - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + /** Place servesBreakfast */ + servesBreakfast?: (boolean|null); - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + /** Place servesLunch */ + servesLunch?: (boolean|null); - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + /** Place servesDinner */ + servesDinner?: (boolean|null); - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place servesBeer */ + servesBeer?: (boolean|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Place servesWine */ + servesWine?: (boolean|null); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** Place servesBrunch */ + servesBrunch?: (boolean|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** Place servesVegetarianFood */ + servesVegetarianFood?: (boolean|null); - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Place currentOpeningHours */ + currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** Place currentSecondaryOpeningHours */ + currentSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** Place regularSecondaryOpeningHours */ + regularSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); - /** FieldOptions packed. */ - public packed: boolean; + /** Place editorialSummary */ + editorialSummary?: (google.type.ILocalizedText|null); - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** Place outdoorSeating */ + outdoorSeating?: (boolean|null); - /** FieldOptions lazy. */ - public lazy: boolean; + /** Place liveMusic */ + liveMusic?: (boolean|null); - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; + /** Place menuForChildren */ + menuForChildren?: (boolean|null); - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** Place servesCocktails */ + servesCocktails?: (boolean|null); - /** FieldOptions weak. */ - public weak: boolean; + /** Place servesDessert */ + servesDessert?: (boolean|null); - /** FieldOptions debugRedact. */ - public debugRedact: boolean; + /** Place servesCoffee */ + servesCoffee?: (boolean|null); - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + /** Place goodForChildren */ + goodForChildren?: (boolean|null); - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; + /** Place allowsDogs */ + allowsDogs?: (boolean|null); - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + /** Place restroom */ + restroom?: (boolean|null); - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Place goodForGroups */ + goodForGroups?: (boolean|null); - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Place goodForWatchingSports */ + goodForWatchingSports?: (boolean|null); - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + /** Place paymentOptions */ + paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place parkingOptions */ + parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place subDestinations */ + subDestinations?: (google.maps.places.v1.Place.ISubDestination[]|null); - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + /** Place accessibilityOptions */ + accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + /** Place fuelOptions */ + fuelOptions?: (google.maps.places.v1.IFuelOptions|null); - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place evChargeOptions */ + evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + /** Place generativeSummary */ + generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place areaSummary */ + areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); + } - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a Place. */ + class Place implements IPlace { - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPlace); - namespace FieldOptions { + /** Place name. */ + public name: string; - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } + /** Place id. */ + public id: string; - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } + /** Place displayName. */ + public displayName?: (google.type.ILocalizedText|null); - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } + /** Place types. */ + public types: string[]; - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } + /** Place primaryType. */ + public primaryType: string; - /** Properties of an EditionDefault. */ - interface IEditionDefault { + /** Place primaryTypeDisplayName. */ + public primaryTypeDisplayName?: (google.type.ILocalizedText|null); - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** Place nationalPhoneNumber. */ + public nationalPhoneNumber: string; - /** EditionDefault value */ - value?: (string|null); - } + /** Place internationalPhoneNumber. */ + public internationalPhoneNumber: string; - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { + /** Place formattedAddress. */ + public formattedAddress: string; - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + /** Place shortFormattedAddress. */ + public shortFormattedAddress: string; - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** Place addressComponents. */ + public addressComponents: google.maps.places.v1.Place.IAddressComponent[]; - /** EditionDefault value. */ - public value: string; + /** Place plusCode. */ + public plusCode?: (google.maps.places.v1.Place.IPlusCode|null); - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + /** Place location. */ + public location?: (google.type.ILatLng|null); - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place viewport. */ + public viewport?: (google.geo.type.IViewport|null); - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place rating. */ + public rating: number; - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + /** Place googleMapsUri. */ + public googleMapsUri: string; - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + /** Place websiteUri. */ + public websiteUri: string; - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place reviews. */ + public reviews: google.maps.places.v1.IReview[]; - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + /** Place regularOpeningHours. */ + public regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place utcOffsetMinutes. */ + public utcOffsetMinutes?: (number|null); - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Place photos. */ + public photos: google.maps.places.v1.IPhoto[]; - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** Place adrFormatAddress. */ + public adrFormatAddress: string; - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Place businessStatus. */ + public businessStatus: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus); - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place priceLevel. */ + public priceLevel: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** Place attributions. */ + public attributions: google.maps.places.v1.Place.IAttribution[]; - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Place userRatingCount. */ + public userRatingCount?: (number|null); - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** Place iconMaskBaseUri. */ + public iconMaskBaseUri: string; - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Place iconBackgroundColor. */ + public iconBackgroundColor: string; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Place takeout. */ + public takeout?: (boolean|null); - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + /** Place delivery. */ + public delivery?: (boolean|null); - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place dineIn. */ + public dineIn?: (boolean|null); - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place curbsidePickup. */ + public curbsidePickup?: (boolean|null); - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + /** Place reservable. */ + public reservable?: (boolean|null); - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + /** Place servesBreakfast. */ + public servesBreakfast?: (boolean|null); - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place servesLunch. */ + public servesLunch?: (boolean|null); - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + /** Place servesDinner. */ + public servesDinner?: (boolean|null); - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place servesBeer. */ + public servesBeer?: (boolean|null); - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Place servesWine. */ + public servesWine?: (boolean|null); - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** Place servesBrunch. */ + public servesBrunch?: (boolean|null); - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** Place servesVegetarianFood. */ + public servesVegetarianFood?: (boolean|null); - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** Place currentOpeningHours. */ + public currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** Place currentSecondaryOpeningHours. */ + public currentSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place regularSecondaryOpeningHours. */ + public regularSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** Place editorialSummary. */ + public editorialSummary?: (google.type.ILocalizedText|null); - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Place outdoorSeating. */ + public outdoorSeating?: (boolean|null); - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + /** Place liveMusic. */ + public liveMusic?: (boolean|null); - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** Place menuForChildren. */ + public menuForChildren?: (boolean|null); - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** Place servesCocktails. */ + public servesCocktails?: (boolean|null); - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** Place servesDessert. */ + public servesDessert?: (boolean|null); - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Place servesCoffee. */ + public servesCoffee?: (boolean|null); - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Place goodForChildren. */ + public goodForChildren?: (boolean|null); - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + /** Place allowsDogs. */ + public allowsDogs?: (boolean|null); - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place restroom. */ + public restroom?: (boolean|null); - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place goodForGroups. */ + public goodForGroups?: (boolean|null); - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + /** Place goodForWatchingSports. */ + public goodForWatchingSports?: (boolean|null); - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + /** Place paymentOptions. */ + public paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place parkingOptions. */ + public parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + /** Place subDestinations. */ + public subDestinations: google.maps.places.v1.Place.ISubDestination[]; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place accessibilityOptions. */ + public accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Place fuelOptions. */ + public fuelOptions?: (google.maps.places.v1.IFuelOptions|null); - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Place evChargeOptions. */ + public evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Place generativeSummary. */ + public generativeSummary?: (google.maps.places.v1.Place.IGenerativeSummary|null); - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** Place areaSummary. */ + public areaSummary?: (google.maps.places.v1.Place.IAreaSummary|null); - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place _utcOffsetMinutes. */ + public _utcOffsetMinutes?: "utcOffsetMinutes"; - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); + /** Place _userRatingCount. */ + public _userRatingCount?: "userRatingCount"; - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** Place _takeout. */ + public _takeout?: "takeout"; - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Place _delivery. */ + public _delivery?: "delivery"; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** Place _dineIn. */ + public _dineIn?: "dineIn"; - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** Place _curbsidePickup. */ + public _curbsidePickup?: "curbsidePickup"; - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Place _reservable. */ + public _reservable?: "reservable"; - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; + /** Place _servesBreakfast. */ + public _servesBreakfast?: "servesBreakfast"; - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Place _servesLunch. */ + public _servesLunch?: "servesLunch"; - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + /** Place _servesDinner. */ + public _servesDinner?: "servesDinner"; - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place _servesBeer. */ + public _servesBeer?: "servesBeer"; - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Place _servesWine. */ + public _servesWine?: "servesWine"; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + /** Place _servesBrunch. */ + public _servesBrunch?: "servesBrunch"; - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + /** Place _servesVegetarianFood. */ + public _servesVegetarianFood?: "servesVegetarianFood"; - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Place _outdoorSeating. */ + public _outdoorSeating?: "outdoorSeating"; - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + /** Place _liveMusic. */ + public _liveMusic?: "liveMusic"; - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Place _menuForChildren. */ + public _menuForChildren?: "menuForChildren"; - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Place _servesCocktails. */ + public _servesCocktails?: "servesCocktails"; - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Place _servesDessert. */ + public _servesDessert?: "servesDessert"; - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** Place _servesCoffee. */ + public _servesCoffee?: "servesCoffee"; - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Place _goodForChildren. */ + public _goodForChildren?: "goodForChildren"; - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** Place _allowsDogs. */ + public _allowsDogs?: "allowsDogs"; - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Place _restroom. */ + public _restroom?: "restroom"; - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** Place _goodForGroups. */ + public _goodForGroups?: "goodForGroups"; - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** Place _goodForWatchingSports. */ + public _goodForWatchingSports?: "goodForWatchingSports"; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Place _accessibilityOptions. */ + public _accessibilityOptions?: "accessibilityOptions"; - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: google.maps.places.v1.IPlace): google.maps.places.v1.Place; - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place; - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place; - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Place message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place; - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + namespace Place { - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an AddressComponent. */ + interface IAddressComponent { - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AddressComponent longText */ + longText?: (string|null); - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** AddressComponent shortText */ + shortText?: (string|null); - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** AddressComponent types */ + types?: (string[]|null); - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** AddressComponent languageCode */ + languageCode?: (string|null); + } - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** Represents an AddressComponent. */ + class AddressComponent implements IAddressComponent { - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** + * Constructs a new AddressComponent. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAddressComponent); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** AddressComponent longText. */ + public longText: string; - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** AddressComponent shortText. */ + public shortText: string; - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } + /** AddressComponent types. */ + public types: string[]; - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** AddressComponent languageCode. */ + public languageCode: string; - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** + * Creates a new AddressComponent instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressComponent instance + */ + public static create(properties?: google.maps.places.v1.Place.IAddressComponent): google.maps.places.v1.Place.AddressComponent; - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AddressComponent; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AddressComponent; - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + /** + * Verifies an AddressComponent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressComponent + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AddressComponent; - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @param message AddressComponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + /** + * Converts this AddressComponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + /** + * Gets the default type url for AddressComponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a PlusCode. */ + interface IPlusCode { - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + /** PlusCode globalCode */ + globalCode?: (string|null); - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PlusCode compoundCode */ + compoundCode?: (string|null); + } - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a PlusCode. */ + class PlusCode implements IPlusCode { - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new PlusCode. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IPlusCode); - namespace MethodOptions { + /** PlusCode globalCode. */ + public globalCode: string; - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } + /** PlusCode compoundCode. */ + public compoundCode: string; - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** + * Creates a new PlusCode instance using the specified properties. + * @param [properties] Properties to set + * @returns PlusCode instance + */ + public static create(properties?: google.maps.places.v1.Place.IPlusCode): google.maps.places.v1.Place.PlusCode; - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PlusCode; - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PlusCode; - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** + * Verifies a PlusCode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** + * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlusCode + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PlusCode; - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @param message PlusCode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** + * Converts this PlusCode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** + * Gets the default type url for PlusCode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** Properties of an OpeningHours. */ + interface IOpeningHours { - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** OpeningHours openNow */ + openNow?: (boolean|null); - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + /** OpeningHours periods */ + periods?: (google.maps.places.v1.Place.OpeningHours.IPeriod[]|null); - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** OpeningHours weekdayDescriptions */ + weekdayDescriptions?: (string[]|null); - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** OpeningHours secondaryHoursType */ + secondaryHoursType?: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null); - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** OpeningHours specialDays */ + specialDays?: (google.maps.places.v1.Place.OpeningHours.ISpecialDay[]|null); + } - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** Represents an OpeningHours. */ + class OpeningHours implements IOpeningHours { - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + /** + * Constructs a new OpeningHours. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IOpeningHours); - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + /** OpeningHours openNow. */ + public openNow?: (boolean|null); - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + /** OpeningHours periods. */ + public periods: google.maps.places.v1.Place.OpeningHours.IPeriod[]; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + /** OpeningHours weekdayDescriptions. */ + public weekdayDescriptions: string[]; - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + /** OpeningHours secondaryHoursType. */ + public secondaryHoursType: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType); - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** OpeningHours specialDays. */ + public specialDays: google.maps.places.v1.Place.OpeningHours.ISpecialDay[]; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + /** OpeningHours _openNow. */ + public _openNow?: "openNow"; - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new OpeningHours instance using the specified properties. + * @param [properties] Properties to set + * @returns OpeningHours instance + */ + public static create(properties?: google.maps.places.v1.Place.IOpeningHours): google.maps.places.v1.Place.OpeningHours; - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; - namespace UninterpretedOption { + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours; - /** Properties of a NamePart. */ - interface INamePart { + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours; - /** NamePart namePart */ - namePart: string; + /** + * Verifies an OpeningHours message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** NamePart isExtension */ - isExtension: boolean; - } + /** + * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpeningHours + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours; - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @param message OpeningHours + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** + * Converts this OpeningHours to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NamePart namePart. */ - public namePart: string; + /** + * Gets the default type url for OpeningHours + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** NamePart isExtension. */ - public isExtension: boolean; + namespace OpeningHours { - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + /** Properties of a Period. */ + interface IPeriod { - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** Period open */ + open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** Period close */ + close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + } - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + /** Represents a Period. */ + class Period implements IPeriod { - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new Period. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod); - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** Period open. */ + public open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Period close. */ + public close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new Period instance using the specified properties. + * @param [properties] Properties to set + * @returns Period instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod): google.maps.places.v1.Place.OpeningHours.Period; - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a FeatureSet. */ - interface IFeatureSet { + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + /** + * Decodes a Period message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period; - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period; - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + /** + * Verifies a Period message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Period + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period; - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @param message Period + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } + /** + * Converts this Period to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { + /** + * Gets the default type url for Period + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); + namespace Period { - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + /** Properties of a Point. */ + interface IPoint { - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + /** Point day */ + day?: (number|null); - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + /** Point hour */ + hour?: (number|null); - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + /** Point minute */ + minute?: (number|null); - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + /** Point date */ + date?: (google.type.IDate|null); - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** Point truncated */ + truncated?: (boolean|null); + } - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + /** Represents a Point. */ + class Point implements IPoint { - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Point. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint); - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + /** Point day. */ + public day?: (number|null); - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + /** Point hour. */ + public hour?: (number|null); - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + /** Point minute. */ + public minute?: (number|null); - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Point date. */ + public date?: (google.type.IDate|null); - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + /** Point truncated. */ + public truncated: boolean; - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Point _day. */ + public _day?: "day"; - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Point _hour. */ + public _hour?: "hour"; - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Point _minute. */ + public _minute?: "minute"; - namespace FeatureSet { + /** + * Creates a new Point instance using the specified properties. + * @param [properties] Properties to set + * @returns Point instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint): google.maps.places.v1.Place.OpeningHours.Period.Point; - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } + /** + * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } + /** + * Decodes a Point message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period.Point; - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period.Point; - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } + /** + * Verifies a Point message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Point + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period.Point; - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @param message Point + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + /** + * Converts this Point to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } + /** SecondaryHoursType enum. */ + enum SecondaryHoursType { + SECONDARY_HOURS_TYPE_UNSPECIFIED = 0, + DRIVE_THROUGH = 1, + HAPPY_HOUR = 2, + DELIVERY = 3, + TAKEOUT = 4, + KITCHEN = 5, + BREAKFAST = 6, + LUNCH = 7, + DINNER = 8, + BRUNCH = 9, + PICKUP = 10, + ACCESS = 11, + SENIOR_HOURS = 12, + ONLINE_SERVICE_HOURS = 13 + } - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { + /** Properties of a SpecialDay. */ + interface ISpecialDay { - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); + /** SpecialDay date */ + date?: (google.type.IDate|null); + } - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + /** Represents a SpecialDay. */ + class SpecialDay implements ISpecialDay { - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Constructs a new SpecialDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay); - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** SpecialDay date. */ + public date?: (google.type.IDate|null); - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + /** + * Creates a new SpecialDay instance using the specified properties. + * @param [properties] Properties to set + * @returns SpecialDay instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay): google.maps.places.v1.Place.OpeningHours.SpecialDay; - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.SpecialDay; - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.SpecialDay; - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a SpecialDay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + /** + * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpecialDay + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.SpecialDay; - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @param message SpecialDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.SpecialDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this SpecialDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for SpecialDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - namespace FeatureSetDefaults { + /** BusinessStatus enum. */ + enum BusinessStatus { + BUSINESS_STATUS_UNSPECIFIED = 0, + OPERATIONAL = 1, + CLOSED_TEMPORARILY = 2, + CLOSED_PERMANENTLY = 3 + } - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { + /** Properties of an Attribution. */ + interface IAttribution { - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** Attribution provider */ + provider?: (string|null); + + /** Attribution providerUri */ + providerUri?: (string|null); + } + + /** Represents an Attribution. */ + class Attribution implements IAttribution { + + /** + * Constructs a new Attribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAttribution); + + /** Attribution provider. */ + public provider: string; + + /** Attribution providerUri. */ + public providerUri: string; + + /** + * Creates a new Attribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Attribution instance + */ + public static create(properties?: google.maps.places.v1.Place.IAttribution): google.maps.places.v1.Place.Attribution; + + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + /** + * Decodes an Attribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.Attribution; - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.Attribution; - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Verifies an Attribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Creates an Attribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Attribution + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Attribution; - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @param message Attribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.Attribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Attribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for Attribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + /** Properties of a PaymentOptions. */ + interface IPaymentOptions { - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + /** PaymentOptions acceptsCreditCards */ + acceptsCreditCards?: (boolean|null); - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** PaymentOptions acceptsDebitCards */ + acceptsDebitCards?: (boolean|null); - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + /** PaymentOptions acceptsCashOnly */ + acceptsCashOnly?: (boolean|null); - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PaymentOptions acceptsNfc */ + acceptsNfc?: (boolean|null); + } - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a PaymentOptions. */ + class PaymentOptions implements IPaymentOptions { - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Constructs a new PaymentOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IPaymentOptions); - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** PaymentOptions acceptsCreditCards. */ + public acceptsCreditCards?: (boolean|null); - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** PaymentOptions acceptsDebitCards. */ + public acceptsDebitCards?: (boolean|null); - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** PaymentOptions acceptsCashOnly. */ + public acceptsCashOnly?: (boolean|null); - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** PaymentOptions acceptsNfc. */ + public acceptsNfc?: (boolean|null); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** PaymentOptions _acceptsCreditCards. */ + public _acceptsCreditCards?: "acceptsCreditCards"; - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + /** PaymentOptions _acceptsDebitCards. */ + public _acceptsDebitCards?: "acceptsDebitCards"; - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** PaymentOptions _acceptsCashOnly. */ + public _acceptsCashOnly?: "acceptsCashOnly"; - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** PaymentOptions _acceptsNfc. */ + public _acceptsNfc?: "acceptsNfc"; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + /** + * Creates a new PaymentOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns PaymentOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IPaymentOptions): google.maps.places.v1.Place.PaymentOptions; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + /** + * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @param message PaymentOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @param message PaymentOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + /** + * Decodes a PaymentOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PaymentOptions; - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PaymentOptions; - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a PaymentOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PaymentOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PaymentOptions; - namespace SourceCodeInfo { + /** + * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. + * @param message PaymentOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.PaymentOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Location. */ - interface ILocation { + /** + * Converts this PaymentOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Location path */ - path?: (number[]|null); + /** + * Gets the default type url for PaymentOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Location span */ - span?: (number[]|null); + /** Properties of a ParkingOptions. */ + interface IParkingOptions { - /** Location leadingComments */ - leadingComments?: (string|null); + /** ParkingOptions freeParkingLot */ + freeParkingLot?: (boolean|null); - /** Location trailingComments */ - trailingComments?: (string|null); + /** ParkingOptions paidParkingLot */ + paidParkingLot?: (boolean|null); - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** ParkingOptions freeStreetParking */ + freeStreetParking?: (boolean|null); - /** Represents a Location. */ - class Location implements ILocation { + /** ParkingOptions paidStreetParking */ + paidStreetParking?: (boolean|null); - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** ParkingOptions valetParking */ + valetParking?: (boolean|null); - /** Location path. */ - public path: number[]; + /** ParkingOptions freeGarageParking */ + freeGarageParking?: (boolean|null); - /** Location span. */ - public span: number[]; + /** ParkingOptions paidGarageParking */ + paidGarageParking?: (boolean|null); + } - /** Location leadingComments. */ - public leadingComments: string; + /** Represents a ParkingOptions. */ + class ParkingOptions implements IParkingOptions { - /** Location trailingComments. */ - public trailingComments: string; + /** + * Constructs a new ParkingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IParkingOptions); - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** ParkingOptions freeParkingLot. */ + public freeParkingLot?: (boolean|null); - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + /** ParkingOptions paidParkingLot. */ + public paidParkingLot?: (boolean|null); - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** ParkingOptions freeStreetParking. */ + public freeStreetParking?: (boolean|null); - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** ParkingOptions paidStreetParking. */ + public paidStreetParking?: (boolean|null); - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + /** ParkingOptions valetParking. */ + public valetParking?: (boolean|null); - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + /** ParkingOptions freeGarageParking. */ + public freeGarageParking?: (boolean|null); - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ParkingOptions paidGarageParking. */ + public paidGarageParking?: (boolean|null); - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** ParkingOptions _freeParkingLot. */ + public _freeParkingLot?: "freeParkingLot"; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ParkingOptions _paidParkingLot. */ + public _paidParkingLot?: "paidParkingLot"; - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ParkingOptions _freeStreetParking. */ + public _freeStreetParking?: "freeStreetParking"; - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** ParkingOptions _paidStreetParking. */ + public _paidStreetParking?: "paidStreetParking"; - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** ParkingOptions _valetParking. */ + public _valetParking?: "valetParking"; - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** ParkingOptions _freeGarageParking. */ + public _freeGarageParking?: "freeGarageParking"; - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** ParkingOptions _paidGarageParking. */ + public _paidGarageParking?: "paidGarageParking"; - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** + * Creates a new ParkingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ParkingOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IParkingOptions): google.maps.places.v1.Place.ParkingOptions; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** + * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @param message ParkingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + /** + * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @param message ParkingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ParkingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.ParkingOptions; - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.ParkingOptions; - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + /** + * Verifies a ParkingOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + /** + * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParkingOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.ParkingOptions; - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. + * @param message ParkingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.ParkingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + /** + * Converts this ParkingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for ParkingOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a SubDestination. */ + interface ISubDestination { - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** SubDestination name */ + name?: (string|null); - namespace GeneratedCodeInfo { + /** SubDestination id */ + id?: (string|null); + } - /** Properties of an Annotation. */ - interface IAnnotation { + /** Represents a SubDestination. */ + class SubDestination implements ISubDestination { - /** Annotation path */ - path?: (number[]|null); + /** + * Constructs a new SubDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.ISubDestination); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** SubDestination name. */ + public name: string; - /** Annotation begin */ - begin?: (number|null); + /** SubDestination id. */ + public id: string; - /** Annotation end */ - end?: (number|null); + /** + * Creates a new SubDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns SubDestination instance + */ + public static create(properties?: google.maps.places.v1.Place.ISubDestination): google.maps.places.v1.Place.SubDestination; - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } + /** + * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @param message SubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** + * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @param message SubDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** + * Decodes a SubDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.SubDestination; - /** Annotation path. */ - public path: number[]; + /** + * Decodes a SubDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.SubDestination; - /** Annotation sourceFile. */ - public sourceFile: string; + /** + * Verifies a SubDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Annotation begin. */ - public begin: number; + /** + * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubDestination + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.SubDestination; - /** Annotation end. */ - public end: number; + /** + * Creates a plain object from a SubDestination message. Also converts values to other types if specified. + * @param message SubDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.SubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** + * Converts this SubDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Gets the default type url for SubDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an AccessibilityOptions. */ + interface IAccessibilityOptions { - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** AccessibilityOptions wheelchairAccessibleParking */ + wheelchairAccessibleParking?: (boolean|null); + + /** AccessibilityOptions wheelchairAccessibleEntrance */ + wheelchairAccessibleEntrance?: (boolean|null); - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + /** AccessibilityOptions wheelchairAccessibleRestroom */ + wheelchairAccessibleRestroom?: (boolean|null); - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + /** AccessibilityOptions wheelchairAccessibleSeating */ + wheelchairAccessibleSeating?: (boolean|null); + } - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents an AccessibilityOptions. */ + class AccessibilityOptions implements IAccessibilityOptions { - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Constructs a new AccessibilityOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAccessibilityOptions); - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AccessibilityOptions wheelchairAccessibleParking. */ + public wheelchairAccessibleParking?: (boolean|null); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AccessibilityOptions wheelchairAccessibleEntrance. */ + public wheelchairAccessibleEntrance?: (boolean|null); - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** AccessibilityOptions wheelchairAccessibleRestroom. */ + public wheelchairAccessibleRestroom?: (boolean|null); - namespace Annotation { + /** AccessibilityOptions wheelchairAccessibleSeating. */ + public wheelchairAccessibleSeating?: (boolean|null); - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } + /** AccessibilityOptions _wheelchairAccessibleParking. */ + public _wheelchairAccessibleParking?: "wheelchairAccessibleParking"; - /** Properties of a Duration. */ - interface IDuration { + /** AccessibilityOptions _wheelchairAccessibleEntrance. */ + public _wheelchairAccessibleEntrance?: "wheelchairAccessibleEntrance"; - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** AccessibilityOptions _wheelchairAccessibleRestroom. */ + public _wheelchairAccessibleRestroom?: "wheelchairAccessibleRestroom"; - /** Duration nanos */ - nanos?: (number|null); - } + /** AccessibilityOptions _wheelchairAccessibleSeating. */ + public _wheelchairAccessibleSeating?: "wheelchairAccessibleSeating"; - /** Represents a Duration. */ - class Duration implements IDuration { + /** + * Creates a new AccessibilityOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessibilityOptions instance + */ + public static create(properties?: google.maps.places.v1.Place.IAccessibilityOptions): google.maps.places.v1.Place.AccessibilityOptions; - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** + * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @param message AccessibilityOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Duration seconds. */ - public seconds: (number|Long|string); + /** + * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. + * @param message AccessibilityOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Duration nanos. */ - public nanos: number; + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AccessibilityOptions; - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + /** + * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessibilityOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AccessibilityOptions; - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an AccessibilityOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessibilityOptions + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AccessibilityOptions; - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + /** + * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. + * @param message AccessibilityOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AccessibilityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + /** + * Converts this AccessibilityOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for AccessibilityOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + /** Properties of a GenerativeSummary. */ + interface IGenerativeSummary { - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GenerativeSummary overview */ + overview?: (google.type.ILocalizedText|null); - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** GenerativeSummary description */ + description?: (google.type.ILocalizedText|null); - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** GenerativeSummary references */ + references?: (google.maps.places.v1.IReferences|null); + } - /** Namespace geo. */ - namespace geo { + /** Represents a GenerativeSummary. */ + class GenerativeSummary implements IGenerativeSummary { - /** Namespace type. */ - namespace type { + /** + * Constructs a new GenerativeSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IGenerativeSummary); - /** Properties of a Viewport. */ - interface IViewport { + /** GenerativeSummary overview. */ + public overview?: (google.type.ILocalizedText|null); - /** Viewport low */ - low?: (google.type.ILatLng|null); + /** GenerativeSummary description. */ + public description?: (google.type.ILocalizedText|null); - /** Viewport high */ - high?: (google.type.ILatLng|null); - } + /** GenerativeSummary references. */ + public references?: (google.maps.places.v1.IReferences|null); - /** Represents a Viewport. */ - class Viewport implements IViewport { + /** + * Creates a new GenerativeSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerativeSummary instance + */ + public static create(properties?: google.maps.places.v1.Place.IGenerativeSummary): google.maps.places.v1.Place.GenerativeSummary; - /** - * Constructs a new Viewport. - * @param [properties] Properties to set - */ - constructor(properties?: google.geo.type.IViewport); + /** + * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @param message GenerativeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** Viewport low. */ - public low?: (google.type.ILatLng|null); + /** + * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. + * @param message GenerativeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IGenerativeSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** Viewport high. */ - public high?: (google.type.ILatLng|null); + /** + * Decodes a GenerativeSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.GenerativeSummary; - /** - * Creates a new Viewport instance using the specified properties. - * @param [properties] Properties to set - * @returns Viewport instance - */ - public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport; + /** + * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerativeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.GenerativeSummary; - /** - * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @param message Viewport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a GenerativeSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @param message Viewport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerativeSummary + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.GenerativeSummary; - /** - * Decodes a Viewport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport; + /** + * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. + * @param message GenerativeSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.GenerativeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a Viewport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport; + /** + * Converts this GenerativeSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a Viewport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for GenerativeSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a Viewport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Viewport - */ - public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport; + /** Properties of an AreaSummary. */ + interface IAreaSummary { - /** - * Creates a plain object from a Viewport message. Also converts values to other types if specified. - * @param message Viewport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AreaSummary contentBlocks */ + contentBlocks?: (google.maps.places.v1.IContentBlock[]|null); + } - /** - * Converts this Viewport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an AreaSummary. */ + class AreaSummary implements IAreaSummary { - /** - * Gets the default type url for Viewport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } + /** + * Constructs a new AreaSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAreaSummary); - /** Namespace type. */ - namespace type { + /** AreaSummary contentBlocks. */ + public contentBlocks: google.maps.places.v1.IContentBlock[]; - /** Properties of a LatLng. */ - interface ILatLng { + /** + * Creates a new AreaSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns AreaSummary instance + */ + public static create(properties?: google.maps.places.v1.Place.IAreaSummary): google.maps.places.v1.Place.AreaSummary; - /** LatLng latitude */ - latitude?: (number|null); + /** + * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @param message AreaSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** LatLng longitude */ - longitude?: (number|null); - } + /** + * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @param message AreaSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAreaSummary, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a LatLng. */ - class LatLng implements ILatLng { + /** + * Decodes an AreaSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AreaSummary; - /** - * Constructs a new LatLng. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILatLng); + /** + * Decodes an AreaSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AreaSummary; - /** LatLng latitude. */ - public latitude: number; + /** + * Verifies an AreaSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LatLng longitude. */ - public longitude: number; + /** + * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AreaSummary + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AreaSummary; - /** - * Creates a new LatLng instance using the specified properties. - * @param [properties] Properties to set - * @returns LatLng instance - */ - public static create(properties?: google.type.ILatLng): google.type.LatLng; + /** + * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. + * @param message AreaSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AreaSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @param message LatLng message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this AreaSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @param message LatLng message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for AreaSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Decodes a LatLng message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng; + /** PriceLevel enum. */ + enum PriceLevel { + PRICE_LEVEL_UNSPECIFIED = 0, + PRICE_LEVEL_FREE = 1, + PRICE_LEVEL_INEXPENSIVE = 2, + PRICE_LEVEL_MODERATE = 3, + PRICE_LEVEL_EXPENSIVE = 4, + PRICE_LEVEL_VERY_EXPENSIVE = 5 + } - /** - * Decodes a LatLng message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng; + /** Represents a Places */ + class Places extends $protobuf.rpc.Service { - /** - * Verifies a LatLng message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new Places service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Places service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Places; - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatLng - */ - public static fromObject(object: { [k: string]: any }): google.type.LatLng; + /** + * Calls SearchNearby. + * @param request SearchNearbyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchNearbyResponse + */ + public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest, callback: google.maps.places.v1.Places.SearchNearbyCallback): void; - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @param message LatLng - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls SearchNearby. + * @param request SearchNearbyRequest message or plain object + * @returns Promise + */ + public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest): Promise; - /** - * Converts this LatLng to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchTextResponse + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest, callback: google.maps.places.v1.Places.SearchTextCallback): void; - /** - * Gets the default type url for LatLng - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @returns Promise + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest): Promise; - /** Properties of a Money. */ - interface IMoney { + /** + * Calls GetPhotoMedia. + * @param request GetPhotoMediaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PhotoMedia + */ + public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest, callback: google.maps.places.v1.Places.GetPhotoMediaCallback): void; - /** Money currencyCode */ - currencyCode?: (string|null); + /** + * Calls GetPhotoMedia. + * @param request GetPhotoMediaRequest message or plain object + * @returns Promise + */ + public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest): Promise; - /** Money units */ - units?: (number|Long|string|null); + /** + * Calls GetPlace. + * @param request GetPlaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Place + */ + public getPlace(request: google.maps.places.v1.IGetPlaceRequest, callback: google.maps.places.v1.Places.GetPlaceCallback): void; - /** Money nanos */ - nanos?: (number|null); - } + /** + * Calls GetPlace. + * @param request GetPlaceRequest message or plain object + * @returns Promise + */ + public getPlace(request: google.maps.places.v1.IGetPlaceRequest): Promise; - /** Represents a Money. */ - class Money implements IMoney { + /** + * Calls AutocompletePlaces. + * @param request AutocompletePlacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AutocompletePlacesResponse + */ + public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest, callback: google.maps.places.v1.Places.AutocompletePlacesCallback): void; - /** - * Constructs a new Money. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IMoney); + /** + * Calls AutocompletePlaces. + * @param request AutocompletePlacesRequest message or plain object + * @returns Promise + */ + public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest): Promise; + } - /** Money currencyCode. */ - public currencyCode: string; + namespace Places { - /** Money units. */ - public units: (number|Long|string); + /** + * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. + * @param error Error, if any + * @param [response] SearchNearbyResponse + */ + type SearchNearbyCallback = (error: (Error|null), response?: google.maps.places.v1.SearchNearbyResponse) => void; - /** Money nanos. */ - public nanos: number; + /** + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @param error Error, if any + * @param [response] SearchTextResponse + */ + type SearchTextCallback = (error: (Error|null), response?: google.maps.places.v1.SearchTextResponse) => void; - /** - * Creates a new Money instance using the specified properties. - * @param [properties] Properties to set - * @returns Money instance - */ - public static create(properties?: google.type.IMoney): google.type.Money; + /** + * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. + * @param error Error, if any + * @param [response] PhotoMedia + */ + type GetPhotoMediaCallback = (error: (Error|null), response?: google.maps.places.v1.PhotoMedia) => void; - /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.maps.places.v1.Places|getPlace}. + * @param error Error, if any + * @param [response] Place + */ + type GetPlaceCallback = (error: (Error|null), response?: google.maps.places.v1.Place) => void; - /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @param message Money message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IMoney, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. + * @param error Error, if any + * @param [response] AutocompletePlacesResponse + */ + type AutocompletePlacesCallback = (error: (Error|null), response?: google.maps.places.v1.AutocompletePlacesResponse) => void; + } - /** - * Decodes a Money message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Money; + /** Properties of a SearchNearbyRequest. */ + interface ISearchNearbyRequest { - /** - * Decodes a Money message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Money; + /** SearchNearbyRequest languageCode */ + languageCode?: (string|null); - /** - * Verifies a Money message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** SearchNearbyRequest regionCode */ + regionCode?: (string|null); - /** - * Creates a Money message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Money - */ - public static fromObject(object: { [k: string]: any }): google.type.Money; + /** SearchNearbyRequest includedTypes */ + includedTypes?: (string[]|null); - /** - * Creates a plain object from a Money message. Also converts values to other types if specified. - * @param message Money - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Money, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SearchNearbyRequest excludedTypes */ + excludedTypes?: (string[]|null); - /** - * Converts this Money to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** SearchNearbyRequest includedPrimaryTypes */ + includedPrimaryTypes?: (string[]|null); - /** - * Gets the default type url for Money - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** SearchNearbyRequest excludedPrimaryTypes */ + excludedPrimaryTypes?: (string[]|null); - /** Properties of a LocalizedText. */ - interface ILocalizedText { + /** SearchNearbyRequest maxResultCount */ + maxResultCount?: (number|null); - /** LocalizedText text */ - text?: (string|null); + /** SearchNearbyRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); - /** LocalizedText languageCode */ - languageCode?: (string|null); - } + /** SearchNearbyRequest rankPreference */ + rankPreference?: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference|null); + } - /** Represents a LocalizedText. */ - class LocalizedText implements ILocalizedText { + /** Represents a SearchNearbyRequest. */ + class SearchNearbyRequest implements ISearchNearbyRequest { - /** - * Constructs a new LocalizedText. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILocalizedText); + /** + * Constructs a new SearchNearbyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchNearbyRequest); - /** LocalizedText text. */ - public text: string; + /** SearchNearbyRequest languageCode. */ + public languageCode: string; - /** LocalizedText languageCode. */ - public languageCode: string; + /** SearchNearbyRequest regionCode. */ + public regionCode: string; - /** - * Creates a new LocalizedText instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalizedText instance - */ - public static create(properties?: google.type.ILocalizedText): google.type.LocalizedText; + /** SearchNearbyRequest includedTypes. */ + public includedTypes: string[]; - /** - * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @param message LocalizedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + /** SearchNearbyRequest excludedTypes. */ + public excludedTypes: string[]; - /** - * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @param message LocalizedText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + /** SearchNearbyRequest includedPrimaryTypes. */ + public includedPrimaryTypes: string[]; - /** - * Decodes a LocalizedText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LocalizedText; + /** SearchNearbyRequest excludedPrimaryTypes. */ + public excludedPrimaryTypes: string[]; - /** - * Decodes a LocalizedText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LocalizedText; + /** SearchNearbyRequest maxResultCount. */ + public maxResultCount: number; - /** - * Verifies a LocalizedText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** SearchNearbyRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); - /** - * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalizedText - */ - public static fromObject(object: { [k: string]: any }): google.type.LocalizedText; + /** SearchNearbyRequest rankPreference. */ + public rankPreference: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference); - /** - * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. - * @param message LocalizedText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LocalizedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new SearchNearbyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchNearbyRequest instance + */ + public static create(properties?: google.maps.places.v1.ISearchNearbyRequest): google.maps.places.v1.SearchNearbyRequest; - /** - * Converts this LocalizedText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @param message SearchNearbyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for LocalizedText - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. + * @param message SearchNearbyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Date. */ - interface IDate { + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest; - /** Date year */ - year?: (number|null); + /** + * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchNearbyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest; - /** Date month */ - month?: (number|null); + /** + * Verifies a SearchNearbyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Date day */ - day?: (number|null); - } + /** + * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchNearbyRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest; - /** Represents a Date. */ - class Date implements IDate { + /** + * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. + * @param message SearchNearbyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchNearbyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); + /** + * Converts this SearchNearbyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Date year. */ - public year: number; + /** + * Gets the default type url for SearchNearbyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Date month. */ - public month: number; + namespace SearchNearbyRequest { - /** Date day. */ - public day: number; + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; + /** LocationRestriction circle */ + circle?: (google.maps.places.v1.ICircle|null); + } - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction); - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + /** LocationRestriction circle. */ + public circle?: (google.maps.places.v1.ICircle|null); - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + /** LocationRestriction type. */ + public type?: "circle"; - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - /** - * Gets the default type url for Date - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Verifies a LocationRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Namespace maps. */ - namespace maps { + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; - /** Namespace places. */ - namespace places { + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchNearbyRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace v1. */ - namespace v1 { + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of an AuthorAttribution. */ - interface IAuthorAttribution { + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AuthorAttribution displayName */ - displayName?: (string|null); + /** RankPreference enum. */ + enum RankPreference { + RANK_PREFERENCE_UNSPECIFIED = 0, + DISTANCE = 1, + POPULARITY = 2 + } + } - /** AuthorAttribution uri */ - uri?: (string|null); + /** Properties of a SearchNearbyResponse. */ + interface ISearchNearbyResponse { - /** AuthorAttribution photoUri */ - photoUri?: (string|null); + /** SearchNearbyResponse places */ + places?: (google.maps.places.v1.IPlace[]|null); } - /** Represents an AuthorAttribution. */ - class AuthorAttribution implements IAuthorAttribution { + /** Represents a SearchNearbyResponse. */ + class SearchNearbyResponse implements ISearchNearbyResponse { /** - * Constructs a new AuthorAttribution. + * Constructs a new SearchNearbyResponse. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.IAuthorAttribution); - - /** AuthorAttribution displayName. */ - public displayName: string; - - /** AuthorAttribution uri. */ - public uri: string; + constructor(properties?: google.maps.places.v1.ISearchNearbyResponse); - /** AuthorAttribution photoUri. */ - public photoUri: string; + /** SearchNearbyResponse places. */ + public places: google.maps.places.v1.IPlace[]; /** - * Creates a new AuthorAttribution instance using the specified properties. + * Creates a new SearchNearbyResponse instance using the specified properties. * @param [properties] Properties to set - * @returns AuthorAttribution instance + * @returns SearchNearbyResponse instance */ - public static create(properties?: google.maps.places.v1.IAuthorAttribution): google.maps.places.v1.AuthorAttribution; + public static create(properties?: google.maps.places.v1.ISearchNearbyResponse): google.maps.places.v1.SearchNearbyResponse; /** - * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @param message AuthorAttribution message or plain object to encode + * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @param message SearchNearbyResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @param message AuthorAttribution message or plain object to encode + * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @param message SearchNearbyResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.IAuthorAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AuthorAttribution message from the specified reader or buffer. + * Decodes a SearchNearbyResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AuthorAttribution + * @returns SearchNearbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AuthorAttribution; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyResponse; /** - * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. + * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AuthorAttribution + * @returns SearchNearbyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AuthorAttribution; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyResponse; /** - * Verifies an AuthorAttribution message. + * Verifies a SearchNearbyResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. + * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AuthorAttribution + * @returns SearchNearbyResponse */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AuthorAttribution; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyResponse; /** - * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. - * @param message AuthorAttribution + * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. + * @param message SearchNearbyResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.AuthorAttribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.SearchNearbyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AuthorAttribution to JSON. + * Converts this SearchNearbyResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AuthorAttribution + * Gets the default type url for SearchNearbyResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a EVChargeOptions. */ - interface IEVChargeOptions { + /** Properties of a SearchTextRequest. */ + interface ISearchTextRequest { - /** EVChargeOptions connectorCount */ - connectorCount?: (number|null); + /** SearchTextRequest textQuery */ + textQuery?: (string|null); - /** EVChargeOptions connectorAggregation */ - connectorAggregation?: (google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]|null); + /** SearchTextRequest languageCode */ + languageCode?: (string|null); + + /** SearchTextRequest regionCode */ + regionCode?: (string|null); + + /** SearchTextRequest rankPreference */ + rankPreference?: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference|null); + + /** SearchTextRequest includedType */ + includedType?: (string|null); + + /** SearchTextRequest openNow */ + openNow?: (boolean|null); + + /** SearchTextRequest minRating */ + minRating?: (number|null); + + /** SearchTextRequest maxResultCount */ + maxResultCount?: (number|null); + + /** SearchTextRequest priceLevels */ + priceLevels?: (google.maps.places.v1.PriceLevel[]|null); + + /** SearchTextRequest strictTypeFiltering */ + strictTypeFiltering?: (boolean|null); + + /** SearchTextRequest locationBias */ + locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + + /** SearchTextRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + + /** SearchTextRequest evOptions */ + evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); } - /** Represents a EVChargeOptions. */ - class EVChargeOptions implements IEVChargeOptions { + /** Represents a SearchTextRequest. */ + class SearchTextRequest implements ISearchTextRequest { + + /** + * Constructs a new SearchTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchTextRequest); + + /** SearchTextRequest textQuery. */ + public textQuery: string; + + /** SearchTextRequest languageCode. */ + public languageCode: string; + + /** SearchTextRequest regionCode. */ + public regionCode: string; + + /** SearchTextRequest rankPreference. */ + public rankPreference: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference); + + /** SearchTextRequest includedType. */ + public includedType: string; + + /** SearchTextRequest openNow. */ + public openNow: boolean; + + /** SearchTextRequest minRating. */ + public minRating: number; + + /** SearchTextRequest maxResultCount. */ + public maxResultCount: number; + + /** SearchTextRequest priceLevels. */ + public priceLevels: google.maps.places.v1.PriceLevel[]; + + /** SearchTextRequest strictTypeFiltering. */ + public strictTypeFiltering: boolean; - /** - * Constructs a new EVChargeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IEVChargeOptions); + /** SearchTextRequest locationBias. */ + public locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); - /** EVChargeOptions connectorCount. */ - public connectorCount: number; + /** SearchTextRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); - /** EVChargeOptions connectorAggregation. */ - public connectorAggregation: google.maps.places.v1.EVChargeOptions.IConnectorAggregation[]; + /** SearchTextRequest evOptions. */ + public evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); /** - * Creates a new EVChargeOptions instance using the specified properties. + * Creates a new SearchTextRequest instance using the specified properties. * @param [properties] Properties to set - * @returns EVChargeOptions instance + * @returns SearchTextRequest instance */ - public static create(properties?: google.maps.places.v1.IEVChargeOptions): google.maps.places.v1.EVChargeOptions; + public static create(properties?: google.maps.places.v1.ISearchTextRequest): google.maps.places.v1.SearchTextRequest; /** - * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @param message EVChargeOptions message or plain object to encode + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @param message EVChargeOptions message or plain object to encode + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.IEVChargeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a EVChargeOptions message from the specified reader or buffer. + * Decodes a SearchTextRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EVChargeOptions + * @returns SearchTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest; /** - * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EVChargeOptions + * @returns SearchTextRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest; /** - * Verifies a EVChargeOptions message. + * Verifies a SearchTextRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EVChargeOptions + * @returns SearchTextRequest */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest; /** - * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. - * @param message EVChargeOptions + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @param message SearchTextRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.EVChargeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.SearchTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EVChargeOptions to JSON. + * Converts this SearchTextRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EVChargeOptions + * Gets the default type url for SearchTextRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EVChargeOptions { + namespace SearchTextRequest { - /** Properties of a ConnectorAggregation. */ - interface IConnectorAggregation { + /** RankPreference enum. */ + enum RankPreference { + RANK_PREFERENCE_UNSPECIFIED = 0, + DISTANCE = 1, + RELEVANCE = 2 + } - /** ConnectorAggregation type */ - type?: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType|null); + /** Properties of a LocationBias. */ + interface ILocationBias { - /** ConnectorAggregation maxChargeRateKw */ - maxChargeRateKw?: (number|null); + /** LocationBias rectangle */ + rectangle?: (google.geo.type.IViewport|null); - /** ConnectorAggregation count */ - count?: (number|null); + /** LocationBias circle */ + circle?: (google.maps.places.v1.ICircle|null); + } - /** ConnectorAggregation availableCount */ - availableCount?: (number|null); + /** Represents a LocationBias. */ + class LocationBias implements ILocationBias { - /** ConnectorAggregation outOfServiceCount */ - outOfServiceCount?: (number|null); + /** + * Constructs a new LocationBias. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias); - /** ConnectorAggregation availabilityLastUpdateTime */ - availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); - } + /** LocationBias rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); - /** Represents a ConnectorAggregation. */ - class ConnectorAggregation implements IConnectorAggregation { + /** LocationBias circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationBias type. */ + public type?: ("rectangle"|"circle"); /** - * Constructs a new ConnectorAggregation. + * Creates a new LocationBias instance using the specified properties. * @param [properties] Properties to set + * @returns LocationBias instance */ - constructor(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation); + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias): google.maps.places.v1.SearchTextRequest.LocationBias; - /** ConnectorAggregation type. */ - public type: (google.maps.places.v1.EVConnectorType|keyof typeof google.maps.places.v1.EVConnectorType); + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - /** ConnectorAggregation maxChargeRateKw. */ - public maxChargeRateKw: number; + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - /** ConnectorAggregation count. */ - public count: number; + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationBias; - /** ConnectorAggregation availableCount. */ - public availableCount?: (number|null); + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationBias; - /** ConnectorAggregation outOfServiceCount. */ - public outOfServiceCount?: (number|null); + /** + * Verifies a LocationBias message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ConnectorAggregation availabilityLastUpdateTime. */ - public availabilityLastUpdateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationBias + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationBias; - /** ConnectorAggregation _availableCount. */ - public _availableCount?: "availableCount"; + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @param message LocationBias + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConnectorAggregation _outOfServiceCount. */ - public _outOfServiceCount?: "outOfServiceCount"; + /** + * Converts this LocationBias to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; /** - * Creates a new ConnectorAggregation instance using the specified properties. + * Gets the default type url for LocationBias + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { + + /** LocationRestriction rectangle */ + rectangle?: (google.geo.type.IViewport|null); + } + + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { + + /** + * Constructs a new LocationRestriction. * @param [properties] Properties to set - * @returns ConnectorAggregation instance */ - public static create(properties?: google.maps.places.v1.EVChargeOptions.IConnectorAggregation): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction); + + /** LocationRestriction rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationRestriction type. */ + public type?: "rectangle"; /** - * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @param message ConnectorAggregation message or plain object to encode + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. - * @param message ConnectorAggregation message or plain object to encode + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.EVChargeOptions.IConnectorAggregation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConnectorAggregation message from the specified reader or buffer. + * Decodes a LocationRestriction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConnectorAggregation + * @returns LocationRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationRestriction; /** - * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConnectorAggregation + * @returns LocationRestriction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationRestriction; /** - * Verifies a ConnectorAggregation message. + * Verifies a LocationRestriction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConnectorAggregation + * @returns LocationRestriction */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.EVChargeOptions.ConnectorAggregation; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationRestriction; /** - * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. - * @param message ConnectorAggregation + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.EVChargeOptions.ConnectorAggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConnectorAggregation to JSON. + * Converts this LocationRestriction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConnectorAggregation + * Gets the default type url for LocationRestriction * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** EVConnectorType enum. */ - enum EVConnectorType { - EV_CONNECTOR_TYPE_UNSPECIFIED = 0, - EV_CONNECTOR_TYPE_OTHER = 1, - EV_CONNECTOR_TYPE_J1772 = 2, - EV_CONNECTOR_TYPE_TYPE_2 = 3, - EV_CONNECTOR_TYPE_CHADEMO = 4, - EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5, - EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6, - EV_CONNECTOR_TYPE_TESLA = 7, - EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8, - EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9 - } - - /** Properties of a FuelOptions. */ - interface IFuelOptions { - - /** FuelOptions fuelPrices */ - fuelPrices?: (google.maps.places.v1.FuelOptions.IFuelPrice[]|null); - } - - /** Represents a FuelOptions. */ - class FuelOptions implements IFuelOptions { - - /** - * Constructs a new FuelOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IFuelOptions); - - /** FuelOptions fuelPrices. */ - public fuelPrices: google.maps.places.v1.FuelOptions.IFuelPrice[]; - - /** - * Creates a new FuelOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FuelOptions instance - */ - public static create(properties?: google.maps.places.v1.IFuelOptions): google.maps.places.v1.FuelOptions; - - /** - * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @param message FuelOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @param message FuelOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IFuelOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FuelOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions; - - /** - * Decodes a FuelOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions; - - /** - * Verifies a FuelOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FuelOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions; - - /** - * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. - * @param message FuelOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.FuelOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FuelOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for FuelOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FuelOptions { - - /** Properties of a FuelPrice. */ - interface IFuelPrice { - - /** FuelPrice type */ - type?: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null); + /** Properties of a EVOptions. */ + interface IEVOptions { - /** FuelPrice price */ - price?: (google.type.IMoney|null); + /** EVOptions minimumChargingRateKw */ + minimumChargingRateKw?: (number|null); - /** FuelPrice updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** EVOptions connectorTypes */ + connectorTypes?: (google.maps.places.v1.EVConnectorType[]|null); } - /** Represents a FuelPrice. */ - class FuelPrice implements IFuelPrice { + /** Represents a EVOptions. */ + class EVOptions implements IEVOptions { /** - * Constructs a new FuelPrice. + * Constructs a new EVOptions. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.FuelOptions.IFuelPrice); - - /** FuelPrice type. */ - public type: (google.maps.places.v1.FuelOptions.FuelPrice.FuelType|keyof typeof google.maps.places.v1.FuelOptions.FuelPrice.FuelType); + constructor(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions); - /** FuelPrice price. */ - public price?: (google.type.IMoney|null); + /** EVOptions minimumChargingRateKw. */ + public minimumChargingRateKw: number; - /** FuelPrice updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** EVOptions connectorTypes. */ + public connectorTypes: google.maps.places.v1.EVConnectorType[]; /** - * Creates a new FuelPrice instance using the specified properties. + * Creates a new EVOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FuelPrice instance + * @returns EVOptions instance */ - public static create(properties?: google.maps.places.v1.FuelOptions.IFuelPrice): google.maps.places.v1.FuelOptions.FuelPrice; + public static create(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions): google.maps.places.v1.SearchTextRequest.EVOptions; /** - * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @param message FuelPrice message or plain object to encode + * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @param message EVOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. - * @param message FuelPrice message or plain object to encode + * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @param message EVOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.FuelOptions.IFuelPrice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FuelPrice message from the specified reader or buffer. + * Decodes a EVOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FuelPrice + * @returns EVOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.FuelOptions.FuelPrice; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.EVOptions; /** - * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * Decodes a EVOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FuelPrice + * @returns EVOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.FuelOptions.FuelPrice; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.EVOptions; /** - * Verifies a FuelPrice message. + * Verifies a EVOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FuelPrice + * @returns EVOptions */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.FuelOptions.FuelPrice; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.EVOptions; /** - * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. - * @param message FuelPrice + * Creates a plain object from a EVOptions message. Also converts values to other types if specified. + * @param message EVOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.FuelOptions.FuelPrice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.SearchTextRequest.EVOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FuelPrice to JSON. + * Converts this EVOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FuelPrice + * Gets the default type url for EVOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - namespace FuelPrice { - - /** FuelType enum. */ - enum FuelType { - FUEL_TYPE_UNSPECIFIED = 0, - DIESEL = 1, - REGULAR_UNLEADED = 2, - MIDGRADE = 3, - PREMIUM = 4, - SP91 = 5, - SP91_E10 = 6, - SP92 = 7, - SP95 = 8, - SP95_E10 = 9, - SP98 = 10, - SP99 = 11, - SP100 = 12, - LPG = 13, - E80 = 14, - E85 = 15, - METHANE = 16, - BIO_DIESEL = 17, - TRUCK_DIESEL = 18 - } - } } - /** Properties of a Circle. */ - interface ICircle { + /** Properties of a SearchTextResponse. */ + interface ISearchTextResponse { - /** Circle center */ - center?: (google.type.ILatLng|null); + /** SearchTextResponse places */ + places?: (google.maps.places.v1.IPlace[]|null); - /** Circle radius */ - radius?: (number|null); + /** SearchTextResponse contextualContents */ + contextualContents?: (google.maps.places.v1.IContextualContent[]|null); } - /** Represents a Circle. */ - class Circle implements ICircle { + /** Represents a SearchTextResponse. */ + class SearchTextResponse implements ISearchTextResponse { /** - * Constructs a new Circle. + * Constructs a new SearchTextResponse. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.ICircle); + constructor(properties?: google.maps.places.v1.ISearchTextResponse); - /** Circle center. */ - public center?: (google.type.ILatLng|null); + /** SearchTextResponse places. */ + public places: google.maps.places.v1.IPlace[]; - /** Circle radius. */ - public radius: number; + /** SearchTextResponse contextualContents. */ + public contextualContents: google.maps.places.v1.IContextualContent[]; /** - * Creates a new Circle instance using the specified properties. + * Creates a new SearchTextResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Circle instance + * @returns SearchTextResponse instance */ - public static create(properties?: google.maps.places.v1.ICircle): google.maps.places.v1.Circle; + public static create(properties?: google.maps.places.v1.ISearchTextResponse): google.maps.places.v1.SearchTextResponse; /** - * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @param message Circle message or plain object to encode + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @param message Circle message or plain object to encode + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Circle message from the specified reader or buffer. + * Decodes a SearchTextResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Circle + * @returns SearchTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Circle; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextResponse; /** - * Decodes a Circle message from the specified reader or buffer, length delimited. + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Circle + * @returns SearchTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Circle; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextResponse; /** - * Verifies a Circle message. + * Verifies a SearchTextResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Circle + * @returns SearchTextResponse */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Circle; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextResponse; /** - * Creates a plain object from a Circle message. Also converts values to other types if specified. - * @param message Circle + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @param message SearchTextResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.Circle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.SearchTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Circle to JSON. + * Converts this SearchTextResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Circle + * Gets the default type url for SearchTextResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Photo. */ - interface IPhoto { + /** Properties of a GetPhotoMediaRequest. */ + interface IGetPhotoMediaRequest { - /** Photo name */ + /** GetPhotoMediaRequest name */ name?: (string|null); - /** Photo widthPx */ - widthPx?: (number|null); + /** GetPhotoMediaRequest maxWidthPx */ + maxWidthPx?: (number|null); - /** Photo heightPx */ - heightPx?: (number|null); + /** GetPhotoMediaRequest maxHeightPx */ + maxHeightPx?: (number|null); - /** Photo authorAttributions */ - authorAttributions?: (google.maps.places.v1.IAuthorAttribution[]|null); + /** GetPhotoMediaRequest skipHttpRedirect */ + skipHttpRedirect?: (boolean|null); } - /** Represents a Photo. */ - class Photo implements IPhoto { + /** Represents a GetPhotoMediaRequest. */ + class GetPhotoMediaRequest implements IGetPhotoMediaRequest { /** - * Constructs a new Photo. + * Constructs a new GetPhotoMediaRequest. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.IPhoto); + constructor(properties?: google.maps.places.v1.IGetPhotoMediaRequest); - /** Photo name. */ + /** GetPhotoMediaRequest name. */ public name: string; - /** Photo widthPx. */ - public widthPx: number; + /** GetPhotoMediaRequest maxWidthPx. */ + public maxWidthPx: number; - /** Photo heightPx. */ - public heightPx: number; + /** GetPhotoMediaRequest maxHeightPx. */ + public maxHeightPx: number; - /** Photo authorAttributions. */ - public authorAttributions: google.maps.places.v1.IAuthorAttribution[]; + /** GetPhotoMediaRequest skipHttpRedirect. */ + public skipHttpRedirect: boolean; /** - * Creates a new Photo instance using the specified properties. + * Creates a new GetPhotoMediaRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Photo instance + * @returns GetPhotoMediaRequest instance */ - public static create(properties?: google.maps.places.v1.IPhoto): google.maps.places.v1.Photo; + public static create(properties?: google.maps.places.v1.IGetPhotoMediaRequest): google.maps.places.v1.GetPhotoMediaRequest; /** - * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @param message Photo message or plain object to encode + * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @param message GetPhotoMediaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. - * @param message Photo message or plain object to encode + * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @param message GetPhotoMediaRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.IPhoto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Photo message from the specified reader or buffer. + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Photo + * @returns GetPhotoMediaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Photo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPhotoMediaRequest; /** - * Decodes a Photo message from the specified reader or buffer, length delimited. + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Photo + * @returns GetPhotoMediaRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Photo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPhotoMediaRequest; /** - * Verifies a Photo message. + * Verifies a GetPhotoMediaRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Photo + * @returns GetPhotoMediaRequest */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Photo; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPhotoMediaRequest; /** - * Creates a plain object from a Photo message. Also converts values to other types if specified. - * @param message Photo + * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. + * @param message GetPhotoMediaRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.Photo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.GetPhotoMediaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Photo to JSON. + * Converts this GetPhotoMediaRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Photo + * Gets the default type url for GetPhotoMediaRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Place. */ - interface IPlace { - - /** Place name */ - name?: (string|null); - - /** Place id */ - id?: (string|null); - - /** Place displayName */ - displayName?: (google.type.ILocalizedText|null); - - /** Place types */ - types?: (string[]|null); - - /** Place primaryType */ - primaryType?: (string|null); - - /** Place primaryTypeDisplayName */ - primaryTypeDisplayName?: (google.type.ILocalizedText|null); - - /** Place nationalPhoneNumber */ - nationalPhoneNumber?: (string|null); - - /** Place internationalPhoneNumber */ - internationalPhoneNumber?: (string|null); - - /** Place formattedAddress */ - formattedAddress?: (string|null); - - /** Place shortFormattedAddress */ - shortFormattedAddress?: (string|null); - - /** Place addressComponents */ - addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null); - - /** Place plusCode */ - plusCode?: (google.maps.places.v1.Place.IPlusCode|null); - - /** Place location */ - location?: (google.type.ILatLng|null); - - /** Place viewport */ - viewport?: (google.geo.type.IViewport|null); - - /** Place rating */ - rating?: (number|null); - - /** Place googleMapsUri */ - googleMapsUri?: (string|null); - - /** Place websiteUri */ - websiteUri?: (string|null); - - /** Place reviews */ - reviews?: (google.maps.places.v1.IReview[]|null); - - /** Place regularOpeningHours */ - regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); - - /** Place utcOffsetMinutes */ - utcOffsetMinutes?: (number|null); - - /** Place photos */ - photos?: (google.maps.places.v1.IPhoto[]|null); - - /** Place adrFormatAddress */ - adrFormatAddress?: (string|null); - - /** Place businessStatus */ - businessStatus?: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus|null); - - /** Place priceLevel */ - priceLevel?: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel|null); - - /** Place attributions */ - attributions?: (google.maps.places.v1.Place.IAttribution[]|null); - - /** Place userRatingCount */ - userRatingCount?: (number|null); - - /** Place iconMaskBaseUri */ - iconMaskBaseUri?: (string|null); - - /** Place iconBackgroundColor */ - iconBackgroundColor?: (string|null); - - /** Place takeout */ - takeout?: (boolean|null); - - /** Place delivery */ - delivery?: (boolean|null); - - /** Place dineIn */ - dineIn?: (boolean|null); - - /** Place curbsidePickup */ - curbsidePickup?: (boolean|null); - - /** Place reservable */ - reservable?: (boolean|null); - - /** Place servesBreakfast */ - servesBreakfast?: (boolean|null); - - /** Place servesLunch */ - servesLunch?: (boolean|null); - - /** Place servesDinner */ - servesDinner?: (boolean|null); - - /** Place servesBeer */ - servesBeer?: (boolean|null); - - /** Place servesWine */ - servesWine?: (boolean|null); - - /** Place servesBrunch */ - servesBrunch?: (boolean|null); - - /** Place servesVegetarianFood */ - servesVegetarianFood?: (boolean|null); + /** Properties of a PhotoMedia. */ + interface IPhotoMedia { - /** Place currentOpeningHours */ - currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + /** PhotoMedia name */ + name?: (string|null); - /** Place currentSecondaryOpeningHours */ - currentSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + /** PhotoMedia photoUri */ + photoUri?: (string|null); + } - /** Place regularSecondaryOpeningHours */ - regularSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + /** Represents a PhotoMedia. */ + class PhotoMedia implements IPhotoMedia { - /** Place editorialSummary */ - editorialSummary?: (google.type.ILocalizedText|null); + /** + * Constructs a new PhotoMedia. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPhotoMedia); - /** Place outdoorSeating */ - outdoorSeating?: (boolean|null); + /** PhotoMedia name. */ + public name: string; - /** Place liveMusic */ - liveMusic?: (boolean|null); + /** PhotoMedia photoUri. */ + public photoUri: string; - /** Place menuForChildren */ - menuForChildren?: (boolean|null); + /** + * Creates a new PhotoMedia instance using the specified properties. + * @param [properties] Properties to set + * @returns PhotoMedia instance + */ + public static create(properties?: google.maps.places.v1.IPhotoMedia): google.maps.places.v1.PhotoMedia; - /** Place servesCocktails */ - servesCocktails?: (boolean|null); + /** + * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @param message PhotoMedia message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place servesDessert */ - servesDessert?: (boolean|null); + /** + * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @param message PhotoMedia message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place servesCoffee */ - servesCoffee?: (boolean|null); + /** + * Decodes a PhotoMedia message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.PhotoMedia; - /** Place goodForChildren */ - goodForChildren?: (boolean|null); + /** + * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.PhotoMedia; - /** Place allowsDogs */ - allowsDogs?: (boolean|null); + /** + * Verifies a PhotoMedia message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Place restroom */ - restroom?: (boolean|null); + /** + * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhotoMedia + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.PhotoMedia; - /** Place goodForGroups */ - goodForGroups?: (boolean|null); + /** + * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. + * @param message PhotoMedia + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.PhotoMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Place goodForWatchingSports */ - goodForWatchingSports?: (boolean|null); + /** + * Converts this PhotoMedia to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Place paymentOptions */ - paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); + /** + * Gets the default type url for PhotoMedia + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Place parkingOptions */ - parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); + /** Properties of a GetPlaceRequest. */ + interface IGetPlaceRequest { - /** Place subDestinations */ - subDestinations?: (google.maps.places.v1.Place.ISubDestination[]|null); + /** GetPlaceRequest name */ + name?: (string|null); - /** Place accessibilityOptions */ - accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); + /** GetPlaceRequest languageCode */ + languageCode?: (string|null); - /** Place fuelOptions */ - fuelOptions?: (google.maps.places.v1.IFuelOptions|null); + /** GetPlaceRequest regionCode */ + regionCode?: (string|null); - /** Place evChargeOptions */ - evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); + /** GetPlaceRequest sessionToken */ + sessionToken?: (string|null); } - /** Represents a Place. */ - class Place implements IPlace { + /** Represents a GetPlaceRequest. */ + class GetPlaceRequest implements IGetPlaceRequest { /** - * Constructs a new Place. + * Constructs a new GetPlaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.IPlace); + constructor(properties?: google.maps.places.v1.IGetPlaceRequest); - /** Place name. */ + /** GetPlaceRequest name. */ public name: string; - /** Place id. */ - public id: string; + /** GetPlaceRequest languageCode. */ + public languageCode: string; - /** Place displayName. */ - public displayName?: (google.type.ILocalizedText|null); + /** GetPlaceRequest regionCode. */ + public regionCode: string; - /** Place types. */ - public types: string[]; + /** GetPlaceRequest sessionToken. */ + public sessionToken: string; - /** Place primaryType. */ - public primaryType: string; + /** + * Creates a new GetPlaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPlaceRequest instance + */ + public static create(properties?: google.maps.places.v1.IGetPlaceRequest): google.maps.places.v1.GetPlaceRequest; - /** Place primaryTypeDisplayName. */ - public primaryTypeDisplayName?: (google.type.ILocalizedText|null); + /** + * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @param message GetPlaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place nationalPhoneNumber. */ - public nationalPhoneNumber: string; + /** + * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @param message GetPlaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place internationalPhoneNumber. */ - public internationalPhoneNumber: string; + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPlaceRequest; - /** Place formattedAddress. */ - public formattedAddress: string; + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPlaceRequest; - /** Place shortFormattedAddress. */ - public shortFormattedAddress: string; + /** + * Verifies a GetPlaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Place addressComponents. */ - public addressComponents: google.maps.places.v1.Place.IAddressComponent[]; + /** + * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPlaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPlaceRequest; - /** Place plusCode. */ - public plusCode?: (google.maps.places.v1.Place.IPlusCode|null); + /** + * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. + * @param message GetPlaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.GetPlaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Place location. */ - public location?: (google.type.ILatLng|null); + /** + * Converts this GetPlaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPlaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutocompletePlacesRequest. */ + interface IAutocompletePlacesRequest { + + /** AutocompletePlacesRequest input */ + input?: (string|null); + + /** AutocompletePlacesRequest locationBias */ + locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); - /** Place viewport. */ - public viewport?: (google.geo.type.IViewport|null); + /** AutocompletePlacesRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); - /** Place rating. */ - public rating: number; + /** AutocompletePlacesRequest includedPrimaryTypes */ + includedPrimaryTypes?: (string[]|null); - /** Place googleMapsUri. */ - public googleMapsUri: string; + /** AutocompletePlacesRequest includedRegionCodes */ + includedRegionCodes?: (string[]|null); - /** Place websiteUri. */ - public websiteUri: string; + /** AutocompletePlacesRequest languageCode */ + languageCode?: (string|null); - /** Place reviews. */ - public reviews: google.maps.places.v1.IReview[]; + /** AutocompletePlacesRequest regionCode */ + regionCode?: (string|null); - /** Place regularOpeningHours. */ - public regularOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + /** AutocompletePlacesRequest origin */ + origin?: (google.type.ILatLng|null); - /** Place utcOffsetMinutes. */ - public utcOffsetMinutes?: (number|null); + /** AutocompletePlacesRequest inputOffset */ + inputOffset?: (number|null); - /** Place photos. */ - public photos: google.maps.places.v1.IPhoto[]; + /** AutocompletePlacesRequest includeQueryPredictions */ + includeQueryPredictions?: (boolean|null); - /** Place adrFormatAddress. */ - public adrFormatAddress: string; + /** AutocompletePlacesRequest sessionToken */ + sessionToken?: (string|null); + } - /** Place businessStatus. */ - public businessStatus: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus); + /** Represents an AutocompletePlacesRequest. */ + class AutocompletePlacesRequest implements IAutocompletePlacesRequest { - /** Place priceLevel. */ - public priceLevel: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel); + /** + * Constructs a new AutocompletePlacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAutocompletePlacesRequest); - /** Place attributions. */ - public attributions: google.maps.places.v1.Place.IAttribution[]; + /** AutocompletePlacesRequest input. */ + public input: string; - /** Place userRatingCount. */ - public userRatingCount?: (number|null); + /** AutocompletePlacesRequest locationBias. */ + public locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); - /** Place iconMaskBaseUri. */ - public iconMaskBaseUri: string; + /** AutocompletePlacesRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); - /** Place iconBackgroundColor. */ - public iconBackgroundColor: string; + /** AutocompletePlacesRequest includedPrimaryTypes. */ + public includedPrimaryTypes: string[]; - /** Place takeout. */ - public takeout?: (boolean|null); + /** AutocompletePlacesRequest includedRegionCodes. */ + public includedRegionCodes: string[]; - /** Place delivery. */ - public delivery?: (boolean|null); + /** AutocompletePlacesRequest languageCode. */ + public languageCode: string; - /** Place dineIn. */ - public dineIn?: (boolean|null); + /** AutocompletePlacesRequest regionCode. */ + public regionCode: string; - /** Place curbsidePickup. */ - public curbsidePickup?: (boolean|null); + /** AutocompletePlacesRequest origin. */ + public origin?: (google.type.ILatLng|null); - /** Place reservable. */ - public reservable?: (boolean|null); + /** AutocompletePlacesRequest inputOffset. */ + public inputOffset: number; - /** Place servesBreakfast. */ - public servesBreakfast?: (boolean|null); + /** AutocompletePlacesRequest includeQueryPredictions. */ + public includeQueryPredictions: boolean; - /** Place servesLunch. */ - public servesLunch?: (boolean|null); + /** AutocompletePlacesRequest sessionToken. */ + public sessionToken: string; - /** Place servesDinner. */ - public servesDinner?: (boolean|null); + /** + * Creates a new AutocompletePlacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AutocompletePlacesRequest instance + */ + public static create(properties?: google.maps.places.v1.IAutocompletePlacesRequest): google.maps.places.v1.AutocompletePlacesRequest; - /** Place servesBeer. */ - public servesBeer?: (boolean|null); + /** + * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @param message AutocompletePlacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place servesWine. */ - public servesWine?: (boolean|null); + /** + * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @param message AutocompletePlacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place servesBrunch. */ - public servesBrunch?: (boolean|null); + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest; - /** Place servesVegetarianFood. */ - public servesVegetarianFood?: (boolean|null); + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest; - /** Place currentOpeningHours. */ - public currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + /** + * Verifies an AutocompletePlacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Place currentSecondaryOpeningHours. */ - public currentSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + /** + * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutocompletePlacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest; - /** Place regularSecondaryOpeningHours. */ - public regularSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + /** + * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. + * @param message AutocompletePlacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Place editorialSummary. */ - public editorialSummary?: (google.type.ILocalizedText|null); + /** + * Converts this AutocompletePlacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Place outdoorSeating. */ - public outdoorSeating?: (boolean|null); + /** + * Gets the default type url for AutocompletePlacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Place liveMusic. */ - public liveMusic?: (boolean|null); + namespace AutocompletePlacesRequest { - /** Place menuForChildren. */ - public menuForChildren?: (boolean|null); + /** Properties of a LocationBias. */ + interface ILocationBias { - /** Place servesCocktails. */ - public servesCocktails?: (boolean|null); + /** LocationBias rectangle */ + rectangle?: (google.geo.type.IViewport|null); - /** Place servesDessert. */ - public servesDessert?: (boolean|null); + /** LocationBias circle */ + circle?: (google.maps.places.v1.ICircle|null); + } - /** Place servesCoffee. */ - public servesCoffee?: (boolean|null); + /** Represents a LocationBias. */ + class LocationBias implements ILocationBias { - /** Place goodForChildren. */ - public goodForChildren?: (boolean|null); + /** + * Constructs a new LocationBias. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias); - /** Place allowsDogs. */ - public allowsDogs?: (boolean|null); + /** LocationBias rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); - /** Place restroom. */ - public restroom?: (boolean|null); + /** LocationBias circle. */ + public circle?: (google.maps.places.v1.ICircle|null); - /** Place goodForGroups. */ - public goodForGroups?: (boolean|null); + /** LocationBias type. */ + public type?: ("rectangle"|"circle"); - /** Place goodForWatchingSports. */ - public goodForWatchingSports?: (boolean|null); + /** + * Creates a new LocationBias instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationBias instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - /** Place paymentOptions. */ - public paymentOptions?: (google.maps.places.v1.Place.IPaymentOptions|null); + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place parkingOptions. */ - public parkingOptions?: (google.maps.places.v1.Place.IParkingOptions|null); + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place subDestinations. */ - public subDestinations: google.maps.places.v1.Place.ISubDestination[]; + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - /** Place accessibilityOptions. */ - public accessibilityOptions?: (google.maps.places.v1.Place.IAccessibilityOptions|null); + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - /** Place fuelOptions. */ - public fuelOptions?: (google.maps.places.v1.IFuelOptions|null); + /** + * Verifies a LocationBias message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Place evChargeOptions. */ - public evChargeOptions?: (google.maps.places.v1.IEVChargeOptions|null); + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationBias + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; - /** Place _utcOffsetMinutes. */ - public _utcOffsetMinutes?: "utcOffsetMinutes"; + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @param message LocationBias + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Place _userRatingCount. */ - public _userRatingCount?: "userRatingCount"; + /** + * Converts this LocationBias to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Place _takeout. */ - public _takeout?: "takeout"; + /** + * Gets the default type url for LocationBias + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Place _delivery. */ - public _delivery?: "delivery"; + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { - /** Place _dineIn. */ - public _dineIn?: "dineIn"; + /** LocationRestriction rectangle */ + rectangle?: (google.geo.type.IViewport|null); - /** Place _curbsidePickup. */ - public _curbsidePickup?: "curbsidePickup"; + /** LocationRestriction circle */ + circle?: (google.maps.places.v1.ICircle|null); + } - /** Place _reservable. */ - public _reservable?: "reservable"; + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { - /** Place _servesBreakfast. */ - public _servesBreakfast?: "servesBreakfast"; + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction); - /** Place _servesLunch. */ - public _servesLunch?: "servesLunch"; + /** LocationRestriction rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); - /** Place _servesDinner. */ - public _servesDinner?: "servesDinner"; + /** LocationRestriction circle. */ + public circle?: (google.maps.places.v1.ICircle|null); - /** Place _servesBeer. */ - public _servesBeer?: "servesBeer"; + /** LocationRestriction type. */ + public type?: ("rectangle"|"circle"); - /** Place _servesWine. */ - public _servesWine?: "servesWine"; + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - /** Place _servesBrunch. */ - public _servesBrunch?: "servesBrunch"; + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place _servesVegetarianFood. */ - public _servesVegetarianFood?: "servesVegetarianFood"; + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; - /** Place _outdoorSeating. */ - public _outdoorSeating?: "outdoorSeating"; + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - /** Place _liveMusic. */ - public _liveMusic?: "liveMusic"; + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - /** Place _menuForChildren. */ - public _menuForChildren?: "menuForChildren"; + /** + * Verifies a LocationRestriction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Place _servesCocktails. */ - public _servesCocktails?: "servesCocktails"; + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; - /** Place _servesDessert. */ - public _servesDessert?: "servesDessert"; + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Place _servesCoffee. */ - public _servesCoffee?: "servesCoffee"; + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Place _goodForChildren. */ - public _goodForChildren?: "goodForChildren"; + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Place _allowsDogs. */ - public _allowsDogs?: "allowsDogs"; + /** Properties of an AutocompletePlacesResponse. */ + interface IAutocompletePlacesResponse { - /** Place _restroom. */ - public _restroom?: "restroom"; + /** AutocompletePlacesResponse suggestions */ + suggestions?: (google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]|null); + } - /** Place _goodForGroups. */ - public _goodForGroups?: "goodForGroups"; + /** Represents an AutocompletePlacesResponse. */ + class AutocompletePlacesResponse implements IAutocompletePlacesResponse { - /** Place _goodForWatchingSports. */ - public _goodForWatchingSports?: "goodForWatchingSports"; + /** + * Constructs a new AutocompletePlacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IAutocompletePlacesResponse); - /** Place _accessibilityOptions. */ - public _accessibilityOptions?: "accessibilityOptions"; + /** AutocompletePlacesResponse suggestions. */ + public suggestions: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]; /** - * Creates a new Place instance using the specified properties. + * Creates a new AutocompletePlacesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Place instance + * @returns AutocompletePlacesResponse instance */ - public static create(properties?: google.maps.places.v1.IPlace): google.maps.places.v1.Place; + public static create(properties?: google.maps.places.v1.IAutocompletePlacesResponse): google.maps.places.v1.AutocompletePlacesResponse; /** - * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @param message Place message or plain object to encode + * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @param message AutocompletePlacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. - * @param message Place message or plain object to encode + * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @param message AutocompletePlacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Place message from the specified reader or buffer. + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Place + * @returns AutocompletePlacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse; /** - * Decodes a Place message from the specified reader or buffer, length delimited. + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Place + * @returns AutocompletePlacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse; /** - * Verifies a Place message. + * Verifies an AutocompletePlacesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Place message from a plain object. Also converts values to their respective internal types. + * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Place + * @returns AutocompletePlacesResponse */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse; /** - * Creates a plain object from a Place message. Also converts values to other types if specified. - * @param message Place + * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. + * @param message AutocompletePlacesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Place to JSON. + * Converts this AutocompletePlacesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Place + * Gets the default type url for AutocompletePlacesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Place { - - /** Properties of an AddressComponent. */ - interface IAddressComponent { + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AddressComponent longText */ - longText?: (string|null); + namespace AutocompletePlacesResponse { - /** AddressComponent shortText */ - shortText?: (string|null); + /** Properties of a Suggestion. */ + interface ISuggestion { - /** AddressComponent types */ - types?: (string[]|null); + /** Suggestion placePrediction */ + placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); - /** AddressComponent languageCode */ - languageCode?: (string|null); + /** Suggestion queryPrediction */ + queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); } - /** Represents an AddressComponent. */ - class AddressComponent implements IAddressComponent { + /** Represents a Suggestion. */ + class Suggestion implements ISuggestion { /** - * Constructs a new AddressComponent. + * Constructs a new Suggestion. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.Place.IAddressComponent); - - /** AddressComponent longText. */ - public longText: string; + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion); - /** AddressComponent shortText. */ - public shortText: string; + /** Suggestion placePrediction. */ + public placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); - /** AddressComponent types. */ - public types: string[]; + /** Suggestion queryPrediction. */ + public queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); - /** AddressComponent languageCode. */ - public languageCode: string; + /** Suggestion kind. */ + public kind?: ("placePrediction"|"queryPrediction"); /** - * Creates a new AddressComponent instance using the specified properties. + * Creates a new Suggestion instance using the specified properties. * @param [properties] Properties to set - * @returns AddressComponent instance + * @returns Suggestion instance */ - public static create(properties?: google.maps.places.v1.Place.IAddressComponent): google.maps.places.v1.Place.AddressComponent; + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; /** - * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @param message AddressComponent message or plain object to encode + * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @param message AddressComponent message or plain object to encode + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @param message Suggestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddressComponent message from the specified reader or buffer. + * Decodes a Suggestion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AddressComponent + * @returns Suggestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AddressComponent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Verifies a Suggestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Suggestion + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @param message Suggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Suggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Suggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Suggestion { + + /** Properties of a StringRange. */ + interface IStringRange { + + /** StringRange startOffset */ + startOffset?: (number|null); + + /** StringRange endOffset */ + endOffset?: (number|null); + } + + /** Represents a StringRange. */ + class StringRange implements IStringRange { + + /** + * Constructs a new StringRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange); + + /** StringRange startOffset. */ + public startOffset: number; + + /** StringRange endOffset. */ + public endOffset: number; + + /** + * Creates a new StringRange instance using the specified properties. + * @param [properties] Properties to set + * @returns StringRange instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @param message StringRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @param message StringRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Decodes a StringRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Verifies a StringRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringRange + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + + /** + * Creates a plain object from a StringRange message. Also converts values to other types if specified. + * @param message StringRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FormattableText. */ + interface IFormattableText { + + /** FormattableText text */ + text?: (string|null); + + /** FormattableText matches */ + matches?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]|null); + } + + /** Represents a FormattableText. */ + class FormattableText implements IFormattableText { + + /** + * Constructs a new FormattableText. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText); + + /** FormattableText text. */ + public text: string; + + /** FormattableText matches. */ + public matches: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]; + + /** + * Creates a new FormattableText instance using the specified properties. + * @param [properties] Properties to set + * @returns FormattableText instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + + /** + * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @param message FormattableText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @param message FormattableText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an AddressComponent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AddressComponent; + /** + * Decodes a FormattableText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - /** - * Verifies an AddressComponent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a FormattableText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - /** - * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddressComponent - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AddressComponent; + /** + * Verifies a FormattableText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. - * @param message AddressComponent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FormattableText + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; - /** - * Converts this AddressComponent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a FormattableText message. Also converts values to other types if specified. + * @param message FormattableText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for AddressComponent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this FormattableText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a PlusCode. */ - interface IPlusCode { + /** + * Gets the default type url for FormattableText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** PlusCode globalCode */ - globalCode?: (string|null); + /** Properties of a StructuredFormat. */ + interface IStructuredFormat { - /** PlusCode compoundCode */ - compoundCode?: (string|null); - } + /** StructuredFormat mainText */ + mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** Represents a PlusCode. */ - class PlusCode implements IPlusCode { + /** StructuredFormat secondaryText */ + secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + } - /** - * Constructs a new PlusCode. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IPlusCode); + /** Represents a StructuredFormat. */ + class StructuredFormat implements IStructuredFormat { - /** PlusCode globalCode. */ - public globalCode: string; + /** + * Constructs a new StructuredFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat); - /** PlusCode compoundCode. */ - public compoundCode: string; + /** StructuredFormat mainText. */ + public mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** - * Creates a new PlusCode instance using the specified properties. - * @param [properties] Properties to set - * @returns PlusCode instance - */ - public static create(properties?: google.maps.places.v1.Place.IPlusCode): google.maps.places.v1.Place.PlusCode; + /** StructuredFormat secondaryText. */ + public secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** - * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @param message PlusCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new StructuredFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StructuredFormat instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - /** - * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @param message PlusCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @param message StructuredFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a PlusCode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PlusCode; + /** + * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @param message StructuredFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a PlusCode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PlusCode; + /** + * Decodes a StructuredFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - /** - * Verifies a PlusCode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - /** - * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlusCode - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PlusCode; + /** + * Verifies a StructuredFormat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a PlusCode message. Also converts values to other types if specified. - * @param message PlusCode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StructuredFormat + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; - /** - * Converts this PlusCode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. + * @param message StructuredFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for PlusCode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this StructuredFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of an OpeningHours. */ - interface IOpeningHours { + /** + * Gets the default type url for StructuredFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** OpeningHours openNow */ - openNow?: (boolean|null); + /** Properties of a PlacePrediction. */ + interface IPlacePrediction { - /** OpeningHours periods */ - periods?: (google.maps.places.v1.Place.OpeningHours.IPeriod[]|null); + /** PlacePrediction place */ + place?: (string|null); - /** OpeningHours weekdayDescriptions */ - weekdayDescriptions?: (string[]|null); + /** PlacePrediction placeId */ + placeId?: (string|null); - /** OpeningHours secondaryHoursType */ - secondaryHoursType?: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null); + /** PlacePrediction text */ + text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** OpeningHours specialDays */ - specialDays?: (google.maps.places.v1.Place.OpeningHours.ISpecialDay[]|null); - } + /** PlacePrediction structuredFormat */ + structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - /** Represents an OpeningHours. */ - class OpeningHours implements IOpeningHours { + /** PlacePrediction types */ + types?: (string[]|null); - /** - * Constructs a new OpeningHours. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IOpeningHours); + /** PlacePrediction distanceMeters */ + distanceMeters?: (number|null); + } - /** OpeningHours openNow. */ - public openNow?: (boolean|null); + /** Represents a PlacePrediction. */ + class PlacePrediction implements IPlacePrediction { - /** OpeningHours periods. */ - public periods: google.maps.places.v1.Place.OpeningHours.IPeriod[]; + /** + * Constructs a new PlacePrediction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction); - /** OpeningHours weekdayDescriptions. */ - public weekdayDescriptions: string[]; + /** PlacePrediction place. */ + public place: string; - /** OpeningHours secondaryHoursType. */ - public secondaryHoursType: (google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHoursType); + /** PlacePrediction placeId. */ + public placeId: string; - /** OpeningHours specialDays. */ - public specialDays: google.maps.places.v1.Place.OpeningHours.ISpecialDay[]; + /** PlacePrediction text. */ + public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** OpeningHours _openNow. */ - public _openNow?: "openNow"; + /** PlacePrediction structuredFormat. */ + public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - /** - * Creates a new OpeningHours instance using the specified properties. - * @param [properties] Properties to set - * @returns OpeningHours instance - */ - public static create(properties?: google.maps.places.v1.Place.IOpeningHours): google.maps.places.v1.Place.OpeningHours; + /** PlacePrediction types. */ + public types: string[]; - /** - * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @param message OpeningHours message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + /** PlacePrediction distanceMeters. */ + public distanceMeters: number; - /** - * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @param message OpeningHours message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new PlacePrediction instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacePrediction instance + */ + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - /** - * Decodes an OpeningHours message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours; + /** + * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @param message PlacePrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an OpeningHours message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours; + /** + * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @param message PlacePrediction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an OpeningHours message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a PlacePrediction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - /** - * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OpeningHours - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours; + /** + * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - /** - * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. - * @param message OpeningHours - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a PlacePrediction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this OpeningHours to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacePrediction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; - /** - * Gets the default type url for OpeningHours - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. + * @param message PlacePrediction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace OpeningHours { + /** + * Converts this PlacePrediction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a Period. */ - interface IPeriod { + /** + * Gets the default type url for PlacePrediction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Period open */ - open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + /** Properties of a QueryPrediction. */ + interface IQueryPrediction { - /** Period close */ - close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + /** QueryPrediction text */ + text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + + /** QueryPrediction structuredFormat */ + structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); } - /** Represents a Period. */ - class Period implements IPeriod { + /** Represents a QueryPrediction. */ + class QueryPrediction implements IQueryPrediction { /** - * Constructs a new Period. + * Constructs a new QueryPrediction. * @param [properties] Properties to set */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod); + constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction); - /** Period open. */ - public open?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + /** QueryPrediction text. */ + public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - /** Period close. */ - public close?: (google.maps.places.v1.Place.OpeningHours.Period.IPoint|null); + /** QueryPrediction structuredFormat. */ + public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); /** - * Creates a new Period instance using the specified properties. + * Creates a new QueryPrediction instance using the specified properties. * @param [properties] Properties to set - * @returns Period instance + * @returns QueryPrediction instance */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.IPeriod): google.maps.places.v1.Place.OpeningHours.Period; + public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; /** - * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @param message Period message or plain object to encode + * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @param message QueryPrediction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @param message Period message or plain object to encode + * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @param message QueryPrediction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Period message from the specified reader or buffer. + * Decodes a QueryPrediction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Period + * @returns QueryPrediction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; /** - * Decodes a Period message from the specified reader or buffer, length delimited. + * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Period + * @returns QueryPrediction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; /** - * Verifies a Period message. + * Verifies a QueryPrediction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. + * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Period + * @returns QueryPrediction */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period; + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @param message Period + * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. + * @param message QueryPrediction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Period to JSON. + * Converts this QueryPrediction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Period + * Gets the default type url for QueryPrediction * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } + } + } + } + } - namespace Period { + /** Namespace api. */ + namespace api { - /** Properties of a Point. */ - interface IPoint { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** Point day */ - day?: (number|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** Point hour */ - hour?: (number|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** Point minute */ - minute?: (number|null); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** Point date */ - date?: (google.type.IDate|null); + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** Point truncated */ - truncated?: (boolean|null); - } + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - /** Represents a Point. */ - class Point implements IPoint { + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - /** - * Constructs a new Point. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint); + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Point day. */ - public day?: (number|null); + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - /** Point hour. */ - public hour?: (number|null); + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Point minute. */ - public minute?: (number|null); + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Point date. */ - public date?: (google.type.IDate|null); + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Point truncated. */ - public truncated: boolean; + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } - /** Point _day. */ - public _day?: "day"; + /** Properties of a Http. */ + interface IHttp { - /** Point _hour. */ - public _hour?: "hour"; + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** Point _minute. */ - public _minute?: "minute"; + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** - * Creates a new Point instance using the specified properties. - * @param [properties] Properties to set - * @returns Point instance - */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.Period.IPoint): google.maps.places.v1.Place.OpeningHours.Period.Point; + /** Represents a Http. */ + class Http implements IHttp { - /** - * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.Period.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * Decodes a Point message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.Period.Point; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.Period.Point; + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; - /** - * Verifies a Point message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Point - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.Period.Point; + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @param message Point - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.Period.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - /** - * Converts this Point to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - /** - * Gets the default type url for Point - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SecondaryHoursType enum. */ - enum SecondaryHoursType { - SECONDARY_HOURS_TYPE_UNSPECIFIED = 0, - DRIVE_THROUGH = 1, - HAPPY_HOUR = 2, - DELIVERY = 3, - TAKEOUT = 4, - KITCHEN = 5, - BREAKFAST = 6, - LUNCH = 7, - DINNER = 8, - BRUNCH = 9, - PICKUP = 10, - ACCESS = 11, - SENIOR_HOURS = 12, - ONLINE_SERVICE_HOURS = 13 - } + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; - /** Properties of a SpecialDay. */ - interface ISpecialDay { + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SpecialDay date */ - date?: (google.type.IDate|null); - } + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a SpecialDay. */ - class SpecialDay implements ISpecialDay { + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { - /** - * Constructs a new SpecialDay. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay); + /** HttpRule selector */ + selector?: (string|null); - /** SpecialDay date. */ - public date?: (google.type.IDate|null); + /** HttpRule get */ + get?: (string|null); - /** - * Creates a new SpecialDay instance using the specified properties. - * @param [properties] Properties to set - * @returns SpecialDay instance - */ - public static create(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay): google.maps.places.v1.Place.OpeningHours.SpecialDay; + /** HttpRule put */ + put?: (string|null); - /** - * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @param message SpecialDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule post */ + post?: (string|null); - /** - * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @param message SpecialDay message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule delete */ + "delete"?: (string|null); - /** - * Decodes a SpecialDay message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.OpeningHours.SpecialDay; + /** HttpRule patch */ + patch?: (string|null); - /** - * Decodes a SpecialDay message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.OpeningHours.SpecialDay; + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** - * Verifies a SpecialDay message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** HttpRule body */ + body?: (string|null); - /** - * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SpecialDay - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.SpecialDay; + /** HttpRule responseBody */ + responseBody?: (string|null); - /** - * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. - * @param message SpecialDay - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.OpeningHours.SpecialDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** - * Converts this SpecialDay to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** - * Gets the default type url for SpecialDay - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** BusinessStatus enum. */ - enum BusinessStatus { - BUSINESS_STATUS_UNSPECIFIED = 0, - OPERATIONAL = 1, - CLOSED_TEMPORARILY = 2, - CLOSED_PERMANENTLY = 3 - } + /** HttpRule selector. */ + public selector: string; - /** Properties of an Attribution. */ - interface IAttribution { + /** HttpRule get. */ + public get?: (string|null); - /** Attribution provider */ - provider?: (string|null); + /** HttpRule put. */ + public put?: (string|null); - /** Attribution providerUri */ - providerUri?: (string|null); - } + /** HttpRule post. */ + public post?: (string|null); - /** Represents an Attribution. */ - class Attribution implements IAttribution { + /** HttpRule delete. */ + public delete?: (string|null); - /** - * Constructs a new Attribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAttribution); + /** HttpRule patch. */ + public patch?: (string|null); - /** Attribution provider. */ - public provider: string; + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** Attribution providerUri. */ - public providerUri: string; + /** HttpRule body. */ + public body: string; - /** - * Creates a new Attribution instance using the specified properties. - * @param [properties] Properties to set - * @returns Attribution instance - */ - public static create(properties?: google.maps.places.v1.Place.IAttribution): google.maps.places.v1.Place.Attribution; + /** HttpRule responseBody. */ + public responseBody: string; - /** - * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @param message Attribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** - * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @param message Attribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - /** - * Decodes an Attribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.Attribution; + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - /** - * Decodes an Attribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.Attribution; + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Attribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an Attribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Attribution - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Attribution; + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - /** - * Creates a plain object from an Attribution message. Also converts values to other types if specified. - * @param message Attribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.Attribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - /** - * Converts this Attribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - /** - * Gets the default type url for Attribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a PaymentOptions. */ - interface IPaymentOptions { + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** PaymentOptions acceptsCreditCards */ - acceptsCreditCards?: (boolean|null); + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** PaymentOptions acceptsDebitCards */ - acceptsDebitCards?: (boolean|null); + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** PaymentOptions acceptsCashOnly */ - acceptsCashOnly?: (boolean|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** PaymentOptions acceptsNfc */ - acceptsNfc?: (boolean|null); - } + /** CustomHttpPattern path */ + path?: (string|null); + } - /** Represents a PaymentOptions. */ - class PaymentOptions implements IPaymentOptions { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { - /** - * Constructs a new PaymentOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IPaymentOptions); + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); - /** PaymentOptions acceptsCreditCards. */ - public acceptsCreditCards?: (boolean|null); + /** CustomHttpPattern kind. */ + public kind: string; - /** PaymentOptions acceptsDebitCards. */ - public acceptsDebitCards?: (boolean|null); + /** CustomHttpPattern path. */ + public path: string; - /** PaymentOptions acceptsCashOnly. */ - public acceptsCashOnly?: (boolean|null); + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - /** PaymentOptions acceptsNfc. */ - public acceptsNfc?: (boolean|null); + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - /** PaymentOptions _acceptsCreditCards. */ - public _acceptsCreditCards?: "acceptsCreditCards"; + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - /** PaymentOptions _acceptsDebitCards. */ - public _acceptsDebitCards?: "acceptsDebitCards"; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - /** PaymentOptions _acceptsCashOnly. */ - public _acceptsCashOnly?: "acceptsCashOnly"; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - /** PaymentOptions _acceptsNfc. */ - public _acceptsNfc?: "acceptsNfc"; + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new PaymentOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns PaymentOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IPaymentOptions): google.maps.places.v1.Place.PaymentOptions; + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - /** - * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @param message PaymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @param message PaymentOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IPaymentOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a PaymentOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.PaymentOptions; + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.PaymentOptions; + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { - /** - * Verifies a PaymentOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); - /** - * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PaymentOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PaymentOptions; + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } - /** - * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. - * @param message PaymentOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.PaymentOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { - /** - * Converts this PaymentOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); - /** - * Gets the default type url for PaymentOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; - /** Properties of a ParkingOptions. */ - interface IParkingOptions { + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; - /** ParkingOptions freeParkingLot */ - freeParkingLot?: (boolean|null); + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - /** ParkingOptions paidParkingLot */ - paidParkingLot?: (boolean|null); + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** ParkingOptions freeStreetParking */ - freeStreetParking?: (boolean|null); + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** ParkingOptions paidStreetParking */ - paidStreetParking?: (boolean|null); + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - /** ParkingOptions valetParking */ - valetParking?: (boolean|null); + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - /** ParkingOptions freeGarageParking */ - freeGarageParking?: (boolean|null); + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ParkingOptions paidGarageParking */ - paidGarageParking?: (boolean|null); - } + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - /** Represents a ParkingOptions. */ - class ParkingOptions implements IParkingOptions { + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new ParkingOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IParkingOptions); + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ParkingOptions freeParkingLot. */ - public freeParkingLot?: (boolean|null); + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ParkingOptions paidParkingLot. */ - public paidParkingLot?: (boolean|null); + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { - /** ParkingOptions freeStreetParking. */ - public freeStreetParking?: (boolean|null); + /** ClientLibrarySettings version */ + version?: (string|null); - /** ParkingOptions paidStreetParking. */ - public paidStreetParking?: (boolean|null); + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** ParkingOptions valetParking. */ - public valetParking?: (boolean|null); + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); - /** ParkingOptions freeGarageParking. */ - public freeGarageParking?: (boolean|null); + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); - /** ParkingOptions paidGarageParking. */ - public paidGarageParking?: (boolean|null); + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); - /** ParkingOptions _freeParkingLot. */ - public _freeParkingLot?: "freeParkingLot"; + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); - /** ParkingOptions _paidParkingLot. */ - public _paidParkingLot?: "paidParkingLot"; + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); - /** ParkingOptions _freeStreetParking. */ - public _freeStreetParking?: "freeStreetParking"; + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); - /** ParkingOptions _paidStreetParking. */ - public _paidStreetParking?: "paidStreetParking"; + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); - /** ParkingOptions _valetParking. */ - public _valetParking?: "valetParking"; + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); - /** ParkingOptions _freeGarageParking. */ - public _freeGarageParking?: "freeGarageParking"; + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } - /** ParkingOptions _paidGarageParking. */ - public _paidGarageParking?: "paidGarageParking"; + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { - /** - * Creates a new ParkingOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ParkingOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IParkingOptions): google.maps.places.v1.Place.ParkingOptions; + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); - /** - * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @param message ParkingOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ClientLibrarySettings version. */ + public version: string; - /** - * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @param message ParkingOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IParkingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** - * Decodes a ParkingOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.ParkingOptions; + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; - /** - * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.ParkingOptions; + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); - /** - * Verifies a ParkingOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); - /** - * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParkingOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.ParkingOptions; + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); - /** - * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. - * @param message ParkingOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.ParkingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); - /** - * Converts this ParkingOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); - /** - * Gets the default type url for ParkingOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); - /** Properties of a SubDestination. */ - interface ISubDestination { + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); - /** SubDestination name */ - name?: (string|null); + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); - /** SubDestination id */ - id?: (string|null); - } + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - /** Represents a SubDestination. */ - class SubDestination implements ISubDestination { + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new SubDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.ISubDestination); + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SubDestination name. */ - public name: string; + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - /** SubDestination id. */ - public id: string; + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - /** - * Creates a new SubDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns SubDestination instance - */ - public static create(properties?: google.maps.places.v1.Place.ISubDestination): google.maps.places.v1.Place.SubDestination; + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @param message SubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - /** - * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @param message SubDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.ISubDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a SubDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.SubDestination; + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a SubDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.SubDestination; + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a SubDestination message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a Publishing. */ + interface IPublishing { - /** - * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SubDestination - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.SubDestination; + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); - /** - * Creates a plain object from a SubDestination message. Also converts values to other types if specified. - * @param message SubDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.SubDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Publishing newIssueUri */ + newIssueUri?: (string|null); - /** - * Converts this SubDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Publishing documentationUri */ + documentationUri?: (string|null); - /** - * Gets the default type url for SubDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Publishing apiShortName */ + apiShortName?: (string|null); - /** Properties of an AccessibilityOptions. */ - interface IAccessibilityOptions { + /** Publishing githubLabel */ + githubLabel?: (string|null); - /** AccessibilityOptions wheelchairAccessibleParking */ - wheelchairAccessibleParking?: (boolean|null); + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); - /** AccessibilityOptions wheelchairAccessibleEntrance */ - wheelchairAccessibleEntrance?: (boolean|null); + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); - /** AccessibilityOptions wheelchairAccessibleRestroom */ - wheelchairAccessibleRestroom?: (boolean|null); + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - /** AccessibilityOptions wheelchairAccessibleSeating */ - wheelchairAccessibleSeating?: (boolean|null); - } + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); - /** Represents an AccessibilityOptions. */ - class AccessibilityOptions implements IAccessibilityOptions { + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + } - /** - * Constructs a new AccessibilityOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.Place.IAccessibilityOptions); + /** Represents a Publishing. */ + class Publishing implements IPublishing { - /** AccessibilityOptions wheelchairAccessibleParking. */ - public wheelchairAccessibleParking?: (boolean|null); + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); - /** AccessibilityOptions wheelchairAccessibleEntrance. */ - public wheelchairAccessibleEntrance?: (boolean|null); + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; - /** AccessibilityOptions wheelchairAccessibleRestroom. */ - public wheelchairAccessibleRestroom?: (boolean|null); + /** Publishing newIssueUri. */ + public newIssueUri: string; - /** AccessibilityOptions wheelchairAccessibleSeating. */ - public wheelchairAccessibleSeating?: (boolean|null); + /** Publishing documentationUri. */ + public documentationUri: string; - /** AccessibilityOptions _wheelchairAccessibleParking. */ - public _wheelchairAccessibleParking?: "wheelchairAccessibleParking"; + /** Publishing apiShortName. */ + public apiShortName: string; - /** AccessibilityOptions _wheelchairAccessibleEntrance. */ - public _wheelchairAccessibleEntrance?: "wheelchairAccessibleEntrance"; + /** Publishing githubLabel. */ + public githubLabel: string; - /** AccessibilityOptions _wheelchairAccessibleRestroom. */ - public _wheelchairAccessibleRestroom?: "wheelchairAccessibleRestroom"; + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; - /** AccessibilityOptions _wheelchairAccessibleSeating. */ - public _wheelchairAccessibleSeating?: "wheelchairAccessibleSeating"; + /** Publishing docTagPrefix. */ + public docTagPrefix: string; - /** - * Creates a new AccessibilityOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessibilityOptions instance - */ - public static create(properties?: google.maps.places.v1.Place.IAccessibilityOptions): google.maps.places.v1.Place.AccessibilityOptions; + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - /** - * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @param message AccessibilityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; - /** - * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @param message AccessibilityOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.Place.IAccessibilityOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Place.AccessibilityOptions; + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Place.AccessibilityOptions; + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an AccessibilityOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessibilityOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AccessibilityOptions; + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - /** - * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. - * @param message AccessibilityOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Place.AccessibilityOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - /** - * Converts this AccessibilityOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for AccessibilityOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; - /** PriceLevel enum. */ - enum PriceLevel { - PRICE_LEVEL_UNSPECIFIED = 0, - PRICE_LEVEL_FREE = 1, - PRICE_LEVEL_INEXPENSIVE = 2, - PRICE_LEVEL_MODERATE = 3, - PRICE_LEVEL_EXPENSIVE = 4, - PRICE_LEVEL_VERY_EXPENSIVE = 5 - } + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Review. */ - interface IReview { + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Review name */ - name?: (string|null); + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Review relativePublishTimeDescription */ - relativePublishTimeDescription?: (string|null); + /** Properties of a JavaSettings. */ + interface IJavaSettings { - /** Review text */ - text?: (google.type.ILocalizedText|null); + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); - /** Review originalText */ - originalText?: (google.type.ILocalizedText|null); + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); - /** Review rating */ - rating?: (number|null); + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** Review authorAttribution */ - authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { - /** Review publishTime */ - publishTime?: (google.protobuf.ITimestamp|null); - } + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); - /** Represents a Review. */ - class Review implements IReview { + /** JavaSettings libraryPackage. */ + public libraryPackage: string; - /** - * Constructs a new Review. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IReview); + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; - /** Review name. */ - public name: string; + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** Review relativePublishTimeDescription. */ - public relativePublishTimeDescription: string; + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - /** Review text. */ - public text?: (google.type.ILocalizedText|null); + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Review originalText. */ - public originalText?: (google.type.ILocalizedText|null); + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Review rating. */ - public rating: number; + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - /** Review authorAttribution. */ - public authorAttribution?: (google.maps.places.v1.IAuthorAttribution|null); + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - /** Review publishTime. */ - public publishTime?: (google.protobuf.ITimestamp|null); + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new Review instance using the specified properties. - * @param [properties] Properties to set - * @returns Review instance - */ - public static create(properties?: google.maps.places.v1.IReview): google.maps.places.v1.Review; + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - /** - * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @param message Review message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @param message Review message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a Review message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.Review; + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { - /** - * Decodes a Review message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.Review; + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** - * Verifies a Review message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { - /** - * Creates a Review message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Review - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Review; + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); - /** - * Creates a plain object from a Review message. Also converts values to other types if specified. - * @param message Review - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.Review, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** - * Converts this Review to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - /** - * Gets the default type url for Review - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Places */ - class Places extends $protobuf.rpc.Service { + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Places service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - /** - * Creates new Places service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Places; + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - /** - * Calls SearchNearby. - * @param request SearchNearbyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchNearbyResponse - */ - public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest, callback: google.maps.places.v1.Places.SearchNearbyCallback): void; + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Calls SearchNearby. - * @param request SearchNearbyRequest message or plain object - * @returns Promise - */ - public searchNearby(request: google.maps.places.v1.ISearchNearbyRequest): Promise; + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - /** - * Calls SearchText. - * @param request SearchTextRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchTextResponse - */ - public searchText(request: google.maps.places.v1.ISearchTextRequest, callback: google.maps.places.v1.Places.SearchTextCallback): void; + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls SearchText. - * @param request SearchTextRequest message or plain object - * @returns Promise - */ - public searchText(request: google.maps.places.v1.ISearchTextRequest): Promise; + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Calls GetPhotoMedia. - * @param request GetPhotoMediaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PhotoMedia - */ - public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest, callback: google.maps.places.v1.Places.GetPhotoMediaCallback): void; + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls GetPhotoMedia. - * @param request GetPhotoMediaRequest message or plain object - * @returns Promise - */ - public getPhotoMedia(request: google.maps.places.v1.IGetPhotoMediaRequest): Promise; + /** Properties of a PhpSettings. */ + interface IPhpSettings { - /** - * Calls GetPlace. - * @param request GetPlaceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Place - */ - public getPlace(request: google.maps.places.v1.IGetPlaceRequest, callback: google.maps.places.v1.Places.GetPlaceCallback): void; + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** - * Calls GetPlace. - * @param request GetPlaceRequest message or plain object - * @returns Promise - */ - public getPlace(request: google.maps.places.v1.IGetPlaceRequest): Promise; + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { - /** - * Calls AutocompletePlaces. - * @param request AutocompletePlacesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AutocompletePlacesResponse - */ - public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest, callback: google.maps.places.v1.Places.AutocompletePlacesCallback): void; + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); - /** - * Calls AutocompletePlaces. - * @param request AutocompletePlacesRequest message or plain object - * @returns Promise - */ - public autocompletePlaces(request: google.maps.places.v1.IAutocompletePlacesRequest): Promise; - } + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - namespace Places { + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - /** - * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. - * @param error Error, if any - * @param [response] SearchNearbyResponse - */ - type SearchNearbyCallback = (error: (Error|null), response?: google.maps.places.v1.SearchNearbyResponse) => void; + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.maps.places.v1.Places|searchText}. - * @param error Error, if any - * @param [response] SearchTextResponse - */ - type SearchTextCallback = (error: (Error|null), response?: google.maps.places.v1.SearchTextResponse) => void; + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. - * @param error Error, if any - * @param [response] PhotoMedia - */ - type GetPhotoMediaCallback = (error: (Error|null), response?: google.maps.places.v1.PhotoMedia) => void; + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - /** - * Callback as used by {@link google.maps.places.v1.Places|getPlace}. - * @param error Error, if any - * @param [response] Place - */ - type GetPlaceCallback = (error: (Error|null), response?: google.maps.places.v1.Place) => void; + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - /** - * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. - * @param error Error, if any - * @param [response] AutocompletePlacesResponse - */ - type AutocompletePlacesCallback = (error: (Error|null), response?: google.maps.places.v1.AutocompletePlacesResponse) => void; - } + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a SearchNearbyRequest. */ - interface ISearchNearbyRequest { + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - /** SearchNearbyRequest languageCode */ - languageCode?: (string|null); + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SearchNearbyRequest regionCode */ - regionCode?: (string|null); + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SearchNearbyRequest includedTypes */ - includedTypes?: (string[]|null); + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SearchNearbyRequest excludedTypes */ - excludedTypes?: (string[]|null); + /** Properties of a PythonSettings. */ + interface IPythonSettings { - /** SearchNearbyRequest includedPrimaryTypes */ - includedPrimaryTypes?: (string[]|null); + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** SearchNearbyRequest excludedPrimaryTypes */ - excludedPrimaryTypes?: (string[]|null); + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { - /** SearchNearbyRequest maxResultCount */ - maxResultCount?: (number|null); + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); - /** SearchNearbyRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** SearchNearbyRequest rankPreference */ - rankPreference?: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference|null); - } + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - /** Represents a SearchNearbyRequest. */ - class SearchNearbyRequest implements ISearchNearbyRequest { + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new SearchNearbyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchNearbyRequest); + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SearchNearbyRequest languageCode. */ - public languageCode: string; + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - /** SearchNearbyRequest regionCode. */ - public regionCode: string; + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - /** SearchNearbyRequest includedTypes. */ - public includedTypes: string[]; + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SearchNearbyRequest excludedTypes. */ - public excludedTypes: string[]; + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - /** SearchNearbyRequest includedPrimaryTypes. */ - public includedPrimaryTypes: string[]; + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SearchNearbyRequest excludedPrimaryTypes. */ - public excludedPrimaryTypes: string[]; + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SearchNearbyRequest maxResultCount. */ - public maxResultCount: number; + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SearchNearbyRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null); + /** Properties of a NodeSettings. */ + interface INodeSettings { - /** SearchNearbyRequest rankPreference. */ - public rankPreference: (google.maps.places.v1.SearchNearbyRequest.RankPreference|keyof typeof google.maps.places.v1.SearchNearbyRequest.RankPreference); + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** - * Creates a new SearchNearbyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchNearbyRequest instance - */ - public static create(properties?: google.maps.places.v1.ISearchNearbyRequest): google.maps.places.v1.SearchNearbyRequest; + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { - /** - * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @param message SearchNearbyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); - /** - * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @param message SearchNearbyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest; + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest; + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a SearchNearbyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchNearbyRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest; + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - /** - * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. - * @param message SearchNearbyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - /** - * Converts this SearchNearbyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for SearchNearbyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - namespace SearchNearbyRequest { + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** LocationRestriction circle */ - circle?: (google.maps.places.v1.ICircle|null); - } + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction); + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); - /** LocationRestriction circle. */ - public circle?: (google.maps.places.v1.ICircle|null); + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); - /** LocationRestriction type. */ - public type?: "circle"; + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchNearbyRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyRequest.LocationRestriction; + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; - /** RankPreference enum. */ - enum RankPreference { - RANK_PREFERENCE_UNSPECIFIED = 0, - DISTANCE = 1, - POPULARITY = 2 - } - } + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; - /** Properties of a SearchNearbyResponse. */ - interface ISearchNearbyResponse { + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - /** SearchNearbyResponse places */ - places?: (google.maps.places.v1.IPlace[]|null); - } + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a SearchNearbyResponse. */ - class SearchNearbyResponse implements ISearchNearbyResponse { + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new SearchNearbyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchNearbyResponse); + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - /** SearchNearbyResponse places. */ - public places: google.maps.places.v1.IPlace[]; + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new SearchNearbyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchNearbyResponse instance - */ - public static create(properties?: google.maps.places.v1.ISearchNearbyResponse): google.maps.places.v1.SearchNearbyResponse; + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - /** - * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @param message SearchNearbyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @param message SearchNearbyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchNearbyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchNearbyResponse; + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchNearbyResponse; + /** Properties of a RubySettings. */ + interface IRubySettings { - /** - * Verifies a SearchNearbyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** - * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchNearbyResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchNearbyResponse; + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { - /** - * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. - * @param message SearchNearbyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchNearbyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); - /** - * Converts this SearchNearbyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** - * Gets the default type url for SearchNearbyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - /** Properties of a SearchTextRequest. */ - interface ISearchTextRequest { + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SearchTextRequest textQuery */ - textQuery?: (string|null); + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SearchTextRequest languageCode */ - languageCode?: (string|null); + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - /** SearchTextRequest regionCode */ - regionCode?: (string|null); + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - /** SearchTextRequest rankPreference */ - rankPreference?: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference|null); + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SearchTextRequest includedType */ - includedType?: (string|null); + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - /** SearchTextRequest openNow */ - openNow?: (boolean|null); + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SearchTextRequest minRating */ - minRating?: (number|null); + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SearchTextRequest maxResultCount */ - maxResultCount?: (number|null); + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SearchTextRequest priceLevels */ - priceLevels?: (google.maps.places.v1.PriceLevel[]|null); + /** Properties of a GoSettings. */ + interface IGoSettings { - /** SearchTextRequest strictTypeFiltering */ - strictTypeFiltering?: (boolean|null); + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** SearchTextRequest locationBias */ - locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { - /** SearchTextRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); - /** SearchTextRequest evOptions */ - evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); - } + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** Represents a SearchTextRequest. */ - class SearchTextRequest implements ISearchTextRequest { + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - /** - * Constructs a new SearchTextRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchTextRequest); + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SearchTextRequest textQuery. */ - public textQuery: string; + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** SearchTextRequest languageCode. */ - public languageCode: string; + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - /** SearchTextRequest regionCode. */ - public regionCode: string; + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - /** SearchTextRequest rankPreference. */ - public rankPreference: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference); + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** SearchTextRequest includedType. */ - public includedType: string; + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - /** SearchTextRequest openNow. */ - public openNow: boolean; + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SearchTextRequest minRating. */ - public minRating: number; + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SearchTextRequest maxResultCount. */ - public maxResultCount: number; + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SearchTextRequest priceLevels. */ - public priceLevels: google.maps.places.v1.PriceLevel[]; + /** Properties of a MethodSettings. */ + interface IMethodSettings { - /** SearchTextRequest strictTypeFiltering. */ - public strictTypeFiltering: boolean; + /** MethodSettings selector */ + selector?: (string|null); - /** SearchTextRequest locationBias. */ - public locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** SearchTextRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } - /** SearchTextRequest evOptions. */ - public evOptions?: (google.maps.places.v1.SearchTextRequest.IEVOptions|null); + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { - /** - * Creates a new SearchTextRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchTextRequest instance - */ - public static create(properties?: google.maps.places.v1.ISearchTextRequest): google.maps.places.v1.SearchTextRequest; + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); - /** - * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @param message SearchTextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodSettings selector. */ + public selector: string; - /** - * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @param message SearchTextRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** - * Decodes a SearchTextRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest; + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; - /** - * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest; + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - /** - * Verifies a SearchTextRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchTextRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest; + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. - * @param message SearchTextRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - /** - * Converts this SearchTextRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - /** - * Gets the default type url for SearchTextRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - namespace SearchTextRequest { + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - /** RankPreference enum. */ - enum RankPreference { - RANK_PREFERENCE_UNSPECIFIED = 0, - DISTANCE = 1, - RELEVANCE = 2 - } + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a LocationBias. */ - interface ILocationBias { + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** LocationBias rectangle */ - rectangle?: (google.geo.type.IViewport|null); + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** LocationBias circle */ - circle?: (google.maps.places.v1.ICircle|null); - } + namespace MethodSettings { - /** Represents a LocationBias. */ - class LocationBias implements ILocationBias { + /** Properties of a LongRunning. */ + interface ILongRunning { - /** - * Constructs a new LocationBias. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias); + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); - /** LocationBias rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); - /** LocationBias circle. */ - public circle?: (google.maps.places.v1.ICircle|null); + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); - /** LocationBias type. */ - public type?: ("rectangle"|"circle"); + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } - /** - * Creates a new LocationBias instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationBias instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias): google.maps.places.v1.SearchTextRequest.LocationBias; + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationBias; + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationBias; + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); - /** - * Verifies a LocationBias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationBias - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationBias; + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @param message LocationBias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this LocationBias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for LocationBias - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - /** LocationRestriction rectangle */ - rectangle?: (google.geo.type.IViewport|null); - } + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction); + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LocationRestriction rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** LocationRestriction type. */ - public type?: "rectangle"; + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction): google.maps.places.v1.SearchTextRequest.LocationRestriction; + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + } - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.LocationRestriction; + /** Namespace protobuf. */ + namespace protobuf { - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.LocationRestriction; + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationRestriction; + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - /** Properties of a EVOptions. */ - interface IEVOptions { + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** EVOptions minimumChargingRateKw */ - minimumChargingRateKw?: (number|null); + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - /** EVOptions connectorTypes */ - connectorTypes?: (google.maps.places.v1.EVConnectorType[]|null); - } + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - /** Represents a EVOptions. */ - class EVOptions implements IEVOptions { + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - /** - * Constructs a new EVOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions); + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** EVOptions minimumChargingRateKw. */ - public minimumChargingRateKw: number; + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - /** EVOptions connectorTypes. */ - public connectorTypes: google.maps.places.v1.EVConnectorType[]; + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new EVOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EVOptions instance - */ - public static create(properties?: google.maps.places.v1.SearchTextRequest.IEVOptions): google.maps.places.v1.SearchTextRequest.EVOptions; + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @param message EVOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @param message EVOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.IEVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } - /** - * Decodes a EVOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextRequest.EVOptions; + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** - * Decodes a EVOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextRequest.EVOptions; + /** FileDescriptorProto name */ + name?: (string|null); - /** - * Verifies a EVOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** - * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EVOptions - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.EVOptions; + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** - * Creates a plain object from a EVOptions message. Also converts values to other types if specified. - * @param message EVOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextRequest.EVOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** - * Converts this EVOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** - * Gets the default type url for EVOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** Properties of a SearchTextResponse. */ - interface ISearchTextResponse { + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** SearchTextResponse places */ - places?: (google.maps.places.v1.IPlace[]|null); - } + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** Represents a SearchTextResponse. */ - class SearchTextResponse implements ISearchTextResponse { + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Constructs a new SearchTextResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.ISearchTextResponse); + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** SearchTextResponse places. */ - public places: google.maps.places.v1.IPlace[]; + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Creates a new SearchTextResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchTextResponse instance - */ - public static create(properties?: google.maps.places.v1.ISearchTextResponse): google.maps.places.v1.SearchTextResponse; + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** - * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @param message SearchTextResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** - * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @param message SearchTextResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileDescriptorProto name. */ + public name: string; - /** - * Decodes a SearchTextResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.SearchTextResponse; + /** FileDescriptorProto package. */ + public package: string; - /** - * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.SearchTextResponse; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** - * Verifies a SearchTextResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** - * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchTextResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextResponse; + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** - * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. - * @param message SearchTextResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.SearchTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** - * Converts this SearchTextResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Gets the default type url for SearchTextResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** Properties of a GetPhotoMediaRequest. */ - interface IGetPhotoMediaRequest { + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** GetPhotoMediaRequest name */ - name?: (string|null); + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** GetPhotoMediaRequest maxWidthPx */ - maxWidthPx?: (number|null); + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** GetPhotoMediaRequest maxHeightPx */ - maxHeightPx?: (number|null); + /** FileDescriptorProto syntax. */ + public syntax: string; - /** GetPhotoMediaRequest skipHttpRedirect */ - skipHttpRedirect?: (boolean|null); - } + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** Represents a GetPhotoMediaRequest. */ - class GetPhotoMediaRequest implements IGetPhotoMediaRequest { + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - /** - * Constructs a new GetPhotoMediaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IGetPhotoMediaRequest); + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetPhotoMediaRequest name. */ - public name: string; + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetPhotoMediaRequest maxWidthPx. */ - public maxWidthPx: number; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - /** GetPhotoMediaRequest maxHeightPx. */ - public maxHeightPx: number; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - /** GetPhotoMediaRequest skipHttpRedirect. */ - public skipHttpRedirect: boolean; + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new GetPhotoMediaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPhotoMediaRequest instance - */ - public static create(properties?: google.maps.places.v1.IGetPhotoMediaRequest): google.maps.places.v1.GetPhotoMediaRequest; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - /** - * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @param message GetPhotoMediaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @param message GetPhotoMediaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IGetPhotoMediaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPhotoMediaRequest; + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPhotoMediaRequest; + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** - * Verifies a GetPhotoMediaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DescriptorProto name */ + name?: (string|null); - /** - * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPhotoMediaRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPhotoMediaRequest; + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. - * @param message GetPhotoMediaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.GetPhotoMediaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Converts this GetPhotoMediaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Gets the default type url for GetPhotoMediaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Properties of a PhotoMedia. */ - interface IPhotoMedia { + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** PhotoMedia name */ - name?: (string|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** PhotoMedia photoUri */ - photoUri?: (string|null); - } + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** Represents a PhotoMedia. */ - class PhotoMedia implements IPhotoMedia { + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** - * Constructs a new PhotoMedia. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IPhotoMedia); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** PhotoMedia name. */ - public name: string; + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** PhotoMedia photoUri. */ - public photoUri: string; + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - /** - * Creates a new PhotoMedia instance using the specified properties. - * @param [properties] Properties to set - * @returns PhotoMedia instance - */ - public static create(properties?: google.maps.places.v1.IPhotoMedia): google.maps.places.v1.PhotoMedia; + /** DescriptorProto name. */ + public name: string; - /** - * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @param message PhotoMedia message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** - * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @param message PhotoMedia message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IPhotoMedia, writer?: $protobuf.Writer): $protobuf.Writer; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Decodes a PhotoMedia message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.PhotoMedia; + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** - * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.PhotoMedia; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Verifies a PhotoMedia message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** - * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhotoMedia - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.PhotoMedia; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** - * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. - * @param message PhotoMedia - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.PhotoMedia, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** - * Converts this PhotoMedia to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** - * Gets the default type url for PhotoMedia - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** Properties of a GetPlaceRequest. */ - interface IGetPlaceRequest { + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - /** GetPlaceRequest name */ - name?: (string|null); + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetPlaceRequest languageCode */ - languageCode?: (string|null); + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetPlaceRequest regionCode */ - regionCode?: (string|null); + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - /** GetPlaceRequest sessionToken */ - sessionToken?: (string|null); - } + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - /** Represents a GetPlaceRequest. */ - class GetPlaceRequest implements IGetPlaceRequest { + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Constructs a new GetPlaceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IGetPlaceRequest); + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - /** GetPlaceRequest name. */ - public name: string; + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** GetPlaceRequest languageCode. */ - public languageCode: string; + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** GetPlaceRequest regionCode. */ - public regionCode: string; + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** GetPlaceRequest sessionToken. */ - public sessionToken: string; + namespace DescriptorProto { - /** - * Creates a new GetPlaceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPlaceRequest instance - */ - public static create(properties?: google.maps.places.v1.IGetPlaceRequest): google.maps.places.v1.GetPlaceRequest; + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** - * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @param message GetPlaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRange start */ + start?: (number|null); - /** - * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @param message GetPlaceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IGetPlaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRange end */ + end?: (number|null); - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.GetPlaceRequest; + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.GetPlaceRequest; + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** - * Verifies a GetPlaceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** - * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPlaceRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.GetPlaceRequest; + /** ExtensionRange start. */ + public start: number; - /** - * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. - * @param message GetPlaceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.GetPlaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExtensionRange end. */ + public end: number; - /** - * Converts this GetPlaceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * Gets the default type url for GetPlaceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - /** Properties of an AutocompletePlacesRequest. */ - interface IAutocompletePlacesRequest { + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** AutocompletePlacesRequest input */ - input?: (string|null); + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** AutocompletePlacesRequest locationBias */ - locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - /** AutocompletePlacesRequest locationRestriction */ - locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - /** AutocompletePlacesRequest includedPrimaryTypes */ - includedPrimaryTypes?: (string[]|null); + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** AutocompletePlacesRequest includedRegionCodes */ - includedRegionCodes?: (string[]|null); + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - /** AutocompletePlacesRequest languageCode */ - languageCode?: (string|null); + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AutocompletePlacesRequest regionCode */ - regionCode?: (string|null); + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** AutocompletePlacesRequest origin */ - origin?: (google.type.ILatLng|null); + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AutocompletePlacesRequest inputOffset */ - inputOffset?: (number|null); + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** AutocompletePlacesRequest includeQueryPredictions */ - includeQueryPredictions?: (boolean|null); + /** ReservedRange start */ + start?: (number|null); - /** AutocompletePlacesRequest sessionToken */ - sessionToken?: (string|null); - } + /** ReservedRange end */ + end?: (number|null); + } - /** Represents an AutocompletePlacesRequest. */ - class AutocompletePlacesRequest implements IAutocompletePlacesRequest { + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** - * Constructs a new AutocompletePlacesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IAutocompletePlacesRequest); + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** AutocompletePlacesRequest input. */ - public input: string; + /** ReservedRange start. */ + public start: number; - /** AutocompletePlacesRequest locationBias. */ - public locationBias?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null); + /** ReservedRange end. */ + public end: number; - /** AutocompletePlacesRequest locationRestriction. */ - public locationRestriction?: (google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null); + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - /** AutocompletePlacesRequest includedPrimaryTypes. */ - public includedPrimaryTypes: string[]; + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** AutocompletePlacesRequest includedRegionCodes. */ - public includedRegionCodes: string[]; + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** AutocompletePlacesRequest languageCode. */ - public languageCode: string; + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - /** AutocompletePlacesRequest regionCode. */ - public regionCode: string; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - /** AutocompletePlacesRequest origin. */ - public origin?: (google.type.ILatLng|null); + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** AutocompletePlacesRequest inputOffset. */ - public inputOffset: number; + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - /** AutocompletePlacesRequest includeQueryPredictions. */ - public includeQueryPredictions: boolean; + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AutocompletePlacesRequest sessionToken. */ - public sessionToken: string; + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new AutocompletePlacesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AutocompletePlacesRequest instance - */ - public static create(properties?: google.maps.places.v1.IAutocompletePlacesRequest): google.maps.places.v1.AutocompletePlacesRequest; + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @param message AutocompletePlacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** - * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @param message AutocompletePlacesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest; + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest; + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** - * Verifies an AutocompletePlacesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } - /** - * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutocompletePlacesRequest - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest; + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** - * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. - * @param message AutocompletePlacesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** - * Converts this AutocompletePlacesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Gets the default type url for AutocompletePlacesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - namespace AutocompletePlacesRequest { + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** Properties of a LocationBias. */ - interface ILocationBias { + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - /** LocationBias rectangle */ - rectangle?: (google.geo.type.IViewport|null); + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - /** LocationBias circle */ - circle?: (google.maps.places.v1.ICircle|null); - } + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a LocationBias. */ - class LocationBias implements ILocationBias { + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new LocationBias. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias); + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - /** LocationBias rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - /** LocationBias circle. */ - public circle?: (google.maps.places.v1.ICircle|null); + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** LocationBias type. */ - public type?: ("rectangle"|"circle"); + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - /** - * Creates a new LocationBias instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationBias instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @param message LocationBias message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + namespace ExtensionRangeOptions { - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + /** Properties of a Declaration. */ + interface IDeclaration { - /** - * Verifies a LocationBias message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Declaration number */ + number?: (number|null); - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationBias - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationBias; + /** Declaration fullName */ + fullName?: (string|null); - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @param message LocationBias - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Declaration type */ + type?: (string|null); - /** - * Converts this LocationBias to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Declaration reserved */ + reserved?: (boolean|null); - /** - * Gets the default type url for LocationBias - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Declaration repeated */ + repeated?: (boolean|null); + } - /** Properties of a LocationRestriction. */ - interface ILocationRestriction { + /** Represents a Declaration. */ + class Declaration implements IDeclaration { - /** LocationRestriction rectangle */ - rectangle?: (google.geo.type.IViewport|null); + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - /** LocationRestriction circle */ - circle?: (google.maps.places.v1.ICircle|null); - } + /** Declaration number. */ + public number: number; - /** Represents a LocationRestriction. */ - class LocationRestriction implements ILocationRestriction { + /** Declaration fullName. */ + public fullName: string; - /** - * Constructs a new LocationRestriction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction); + /** Declaration type. */ + public type: string; - /** LocationRestriction rectangle. */ - public rectangle?: (google.geo.type.IViewport|null); + /** Declaration reserved. */ + public reserved: boolean; - /** LocationRestriction circle. */ - public circle?: (google.maps.places.v1.ICircle|null); + /** Declaration repeated. */ + public repeated: boolean; - /** LocationRestriction type. */ - public type?: ("rectangle"|"circle"); + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - /** - * Creates a new LocationRestriction instance using the specified properties. - * @param [properties] Properties to set - * @returns LocationRestriction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @param message LocationRestriction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a LocationRestriction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationRestriction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction; + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @param message LocationRestriction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this LocationRestriction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for LocationRestriction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } - /** Properties of an AutocompletePlacesResponse. */ - interface IAutocompletePlacesResponse { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** AutocompletePlacesResponse suggestions */ - suggestions?: (google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]|null); - } + /** FieldDescriptorProto name */ + name?: (string|null); - /** Represents an AutocompletePlacesResponse. */ - class AutocompletePlacesResponse implements IAutocompletePlacesResponse { + /** FieldDescriptorProto number */ + number?: (number|null); - /** - * Constructs a new AutocompletePlacesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.IAutocompletePlacesResponse); + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** AutocompletePlacesResponse suggestions. */ - public suggestions: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion[]; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * Creates a new AutocompletePlacesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns AutocompletePlacesResponse instance - */ - public static create(properties?: google.maps.places.v1.IAutocompletePlacesResponse): google.maps.places.v1.AutocompletePlacesResponse; + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @param message AutocompletePlacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @param message AutocompletePlacesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.IAutocompletePlacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse; + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse; + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** - * Verifies an AutocompletePlacesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** - * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutocompletePlacesResponse - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse; + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } - /** - * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. - * @param message AutocompletePlacesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** - * Converts this AutocompletePlacesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** - * Gets the default type url for AutocompletePlacesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FieldDescriptorProto name. */ + public name: string; - namespace AutocompletePlacesResponse { + /** FieldDescriptorProto number. */ + public number: number; - /** Properties of a Suggestion. */ - interface ISuggestion { + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** Suggestion placePrediction */ - placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** Suggestion queryPrediction */ - queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); - } + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** Represents a Suggestion. */ - class Suggestion implements ISuggestion { + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Constructs a new Suggestion. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion); + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** Suggestion placePrediction. */ - public placePrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null); + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** Suggestion queryPrediction. */ - public queryPrediction?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null); + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** Suggestion kind. */ - public kind?: ("placePrediction"|"queryPrediction"); + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** - * Creates a new Suggestion instance using the specified properties. - * @param [properties] Properties to set - * @returns Suggestion instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @param message Suggestion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.ISuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Suggestion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - /** - * Verifies a Suggestion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - /** - * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Suggestion - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion; + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @param message Suggestion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - /** - * Converts this Suggestion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for Suggestion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace Suggestion { + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a StringRange. */ - interface IStringRange { + namespace FieldDescriptorProto { - /** StringRange startOffset */ - startOffset?: (number|null); + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } - /** StringRange endOffset */ - endOffset?: (number|null); - } + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } - /** Represents a StringRange. */ - class StringRange implements IStringRange { + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** - * Constructs a new StringRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange); + /** OneofDescriptorProto name */ + name?: (string|null); - /** StringRange startOffset. */ - public startOffset: number; + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** StringRange endOffset. */ - public endOffset: number; + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** - * Creates a new StringRange instance using the specified properties. - * @param [properties] Properties to set - * @returns StringRange instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** - * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @param message StringRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** OneofDescriptorProto name. */ + public name: string; - /** - * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @param message StringRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** - * Decodes a StringRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - /** - * Decodes a StringRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a StringRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a StringRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringRange - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - /** - * Creates a plain object from a StringRange message. Also converts values to other types if specified. - * @param message StringRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - /** - * Converts this StringRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for StringRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - /** Properties of a FormattableText. */ - interface IFormattableText { + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FormattableText text */ - text?: (string|null); + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FormattableText matches */ - matches?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]|null); - } + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a FormattableText. */ - class FormattableText implements IFormattableText { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** - * Constructs a new FormattableText. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText); + /** EnumDescriptorProto name */ + name?: (string|null); - /** FormattableText text. */ - public text: string; + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** FormattableText matches. */ - public matches: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange[]; + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** - * Creates a new FormattableText instance using the specified properties. - * @param [properties] Properties to set - * @returns FormattableText instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** - * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @param message FormattableText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @param message FormattableText message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** - * Decodes a FormattableText message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** - * Decodes a FormattableText message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + /** EnumDescriptorProto name. */ + public name: string; - /** - * Verifies a FormattableText message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** - * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FormattableText - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText; + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** - * Creates a plain object from a FormattableText message. Also converts values to other types if specified. - * @param message FormattableText - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** - * Converts this FormattableText to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** - * Gets the default type url for FormattableText - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - /** Properties of a StructuredFormat. */ - interface IStructuredFormat { + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** StructuredFormat mainText */ - mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** StructuredFormat secondaryText */ - secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); - } + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - /** Represents a StructuredFormat. */ - class StructuredFormat implements IStructuredFormat { + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - /** - * Constructs a new StructuredFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat); + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** StructuredFormat mainText. */ - public mainText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - /** StructuredFormat secondaryText. */ - public secondaryText?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new StructuredFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns StructuredFormat instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @param message StructuredFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @param message StructuredFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat, writer?: $protobuf.Writer): $protobuf.Writer; + namespace EnumDescriptorProto { - /** - * Decodes a StructuredFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** - * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + /** EnumReservedRange start */ + start?: (number|null); - /** - * Verifies a StructuredFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** EnumReservedRange end */ + end?: (number|null); + } - /** - * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StructuredFormat - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat; + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** - * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. - * @param message StructuredFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** - * Converts this StructuredFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** EnumReservedRange start. */ + public start: number; - /** - * Gets the default type url for StructuredFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** EnumReservedRange end. */ + public end: number; - /** Properties of a PlacePrediction. */ - interface IPlacePrediction { + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** PlacePrediction place */ - place?: (string|null); + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** PlacePrediction placeId */ - placeId?: (string|null); + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PlacePrediction text */ - text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** PlacePrediction structuredFormat */ - structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PlacePrediction types */ - types?: (string[]|null); + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** PlacePrediction distanceMeters */ - distanceMeters?: (number|null); - } + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Represents a PlacePrediction. */ - class PlacePrediction implements IPlacePrediction { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** - * Constructs a new PlacePrediction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction); + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** PlacePrediction place. */ - public place: string; + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** PlacePrediction placeId. */ - public placeId: string; + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** PlacePrediction text. */ - public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** PlacePrediction structuredFormat. */ - public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** PlacePrediction types. */ - public types: string[]; + /** EnumValueDescriptorProto name. */ + public name: string; - /** PlacePrediction distanceMeters. */ - public distanceMeters: number; + /** EnumValueDescriptorProto number. */ + public number: number; - /** - * Creates a new PlacePrediction instance using the specified properties. - * @param [properties] Properties to set - * @returns PlacePrediction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** - * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @param message PlacePrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - /** - * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @param message PlacePrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a PlacePrediction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - /** - * Verifies a PlacePrediction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - /** - * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlacePrediction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction; + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. - * @param message PlacePrediction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - /** - * Converts this PlacePrediction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for PlacePrediction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a QueryPrediction. */ - interface IQueryPrediction { + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** QueryPrediction text */ - text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** QueryPrediction structuredFormat */ - structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); - } + /** ServiceDescriptorProto name */ + name?: (string|null); - /** Represents a QueryPrediction. */ - class QueryPrediction implements IQueryPrediction { + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** - * Constructs a new QueryPrediction. - * @param [properties] Properties to set - */ - constructor(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** QueryPrediction text. */ - public text?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null); + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** QueryPrediction structuredFormat. */ - public structuredFormat?: (google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null); + /** ServiceDescriptorProto name. */ + public name: string; - /** - * Creates a new QueryPrediction instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryPrediction instance - */ - public static create(properties?: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** - * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @param message QueryPrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** - * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @param message QueryPrediction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - /** - * Decodes a QueryPrediction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a QueryPrediction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - /** - * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPrediction - */ - public static fromObject(object: { [k: string]: any }): google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - /** - * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. - * @param message QueryPrediction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this QueryPrediction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - /** - * Gets the default type url for QueryPrediction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - } - } + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Namespace api. */ - namespace api { + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new ResourceDescriptor. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** MethodDescriptorProto name. */ + public name: string; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** ResourceDescriptor plural. */ - public plural: string; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns MethodDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; /** - * Verifies a ResourceDescriptor message. + * Verifies a MethodDescriptorProto message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for MethodDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResourceDescriptor { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** ResourceReference type */ - type?: (string|null); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** ResourceReference childType */ - childType?: (string|null); + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { /** - * Constructs a new ResourceReference. + * Constructs a new FileOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.IFileOptions); - /** ResourceReference type. */ - public type: string; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** ResourceReference childType. */ - public childType: string; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns FileOptions instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; /** - * Verifies a ResourceReference message. + * Verifies a FileOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** Properties of a Http. */ - interface IHttp { + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new Http. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IMessageOptions); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Http instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns MessageOptions instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies a Http message. + * Verifies a MessageOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Http + * Gets the default type url for MessageOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpRule. */ - interface IHttpRule { + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** HttpRule selector */ - selector?: (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** HttpRule get */ - get?: (string|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** HttpRule put */ - put?: (string|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** HttpRule post */ - post?: (string|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** HttpRule delete */ - "delete"?: (string|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** HttpRule patch */ - patch?: (string|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** FieldOptions weak */ + weak?: (boolean|null); - /** HttpRule body */ - body?: (string|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new HttpRule. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); + constructor(properties?: google.protobuf.IFieldOptions); - /** HttpRule selector. */ - public selector: string; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** HttpRule get. */ - public get?: (string|null); + /** FieldOptions packed. */ + public packed: boolean; - /** HttpRule put. */ - public put?: (string|null); + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** HttpRule post. */ - public post?: (string|null); + /** FieldOptions lazy. */ + public lazy: boolean; - /** HttpRule delete. */ - public delete?: (string|null); + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** HttpRule patch. */ - public patch?: (string|null); + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** FieldOptions weak. */ + public weak: boolean; - /** HttpRule body. */ - public body: string; + /** FieldOptions debugRedact. */ + public debugRedact: boolean; - /** HttpRule responseBody. */ - public responseBody: string; + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns FieldOptions instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a HttpRule message. + * Verifies a FieldOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpRule + * Gets the default type url for FieldOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + namespace FieldOptions { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** CustomHttpPattern path */ - path?: (string|null); + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new CustomHttpPattern. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.protobuf.IOneofOptions); - /** CustomHttpPattern kind. */ - public kind: string; + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** CustomHttpPattern path. */ - public path: string; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns OneofOptions instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; /** - * Verifies a CustomHttpPattern message. + * Verifies an OneofOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for OneofOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new CommonLanguageSettings. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICommonLanguageSettings); + constructor(properties?: google.protobuf.IEnumOptions); - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns CommonLanguageSettings instance + * @returns EnumOptions instance */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings + * @returns EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings + * @returns EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies a CommonLanguageSettings message. + * Verifies an EnumOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommonLanguageSettings + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for EnumOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new ClientLibrarySettings. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); + constructor(properties?: google.protobuf.IEnumValueOptions); - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ClientLibrarySettings instance + * @returns EnumValueOptions instance */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings + * @returns EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings + * @returns EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; /** - * Verifies a ClientLibrarySettings message. + * Verifies an EnumValueOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClientLibrarySettings + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; /** - * Constructs a new Publishing. - * @param [properties] Properties to set + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.api.IPublishing); + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** Publishing newIssueUri. */ - public newIssueUri: string; + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** Publishing documentationUri. */ - public documentationUri: string; + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** Publishing apiShortName. */ - public apiShortName: string; + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Publishing githubLabel. */ - public githubLabel: string; + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** Publishing docTagPrefix. */ - public docTagPrefix: string; + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Publishing instance + * @returns ServiceOptions instance */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Publishing + * @returns ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Publishing + * @returns ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies a Publishing message. + * Verifies a ServiceOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Publishing + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Publishing to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Publishing + * Gets the default type url for ServiceOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a JavaSettings. */ - interface IJavaSettings { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); } - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new JavaSettings. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IJavaSettings); + constructor(properties?: google.protobuf.IMethodOptions); - /** JavaSettings libraryPackage. */ - public libraryPackage: string; + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns JavaSettings instance + * @returns MethodOptions instance */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JavaSettings + * @returns MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JavaSettings + * @returns MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies a JavaSettings message. + * Verifies a MethodOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JavaSettings + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JavaSettings to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for MethodOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CppSettings. */ - interface ICppSettings { + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new CppSettings instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns CppSettings instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CppSettings + * @returns UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CppSettings + * @returns UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a CppSettings message. + * Verifies an UninterpretedOption message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CppSettings + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CppSettings to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CppSettings + * Gets the default type url for UninterpretedOption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PhpSettings. */ - interface IPhpSettings { + namespace UninterpretedOption { - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { /** - * Constructs a new PhpSettings. + * Constructs a new FeatureSet. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPhpSettings); + constructor(properties?: google.protobuf.IFeatureSet); - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); /** - * Creates a new PhpSettings instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set - * @returns PhpSettings instance + * @returns FeatureSet instance */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PhpSettings + * @returns FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhpSettings + * @returns FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; /** - * Verifies a PhpSettings message. + * Verifies a FeatureSet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhpSettings + * @returns FeatureSet */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhpSettings to JSON. + * Converts this FeatureSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhpSettings + * Gets the default type url for FeatureSet * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PythonSettings. */ - interface IPythonSettings { + namespace FeatureSet { - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } } - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { /** - * Constructs a new PythonSettings. + * Constructs a new FeatureSetDefaults. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPythonSettings); + constructor(properties?: google.protobuf.IFeatureSetDefaults); - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); /** - * Creates a new PythonSettings instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @param [properties] Properties to set - * @returns PythonSettings instance + * @returns FeatureSetDefaults instance */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PythonSettings message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PythonSettings + * @returns FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PythonSettings + * @returns FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; /** - * Verifies a PythonSettings message. + * Verifies a FeatureSetDefaults message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PythonSettings + * @returns FeatureSetDefaults */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PythonSettings to JSON. + * Converts this FeatureSetDefaults to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PythonSettings + * Gets the default type url for FeatureSetDefaults * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NodeSettings. */ - interface INodeSettings { + namespace FeatureSetDefaults { - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); } - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new NodeSettings. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.api.INodeSettings); + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns NodeSettings instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NodeSettings + * @returns SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodeSettings + * @returns SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a NodeSettings message. + * Verifies a SourceCodeInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NodeSettings + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NodeSettings to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NodeSettings + * Gets the default type url for SourceCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + namespace SourceCodeInfo { - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); + /** Properties of a Location. */ + interface ILocation { - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); + /** Location path */ + path?: (number[]|null); - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); + /** Location span */ + span?: (number[]|null); - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); + /** Location leadingComments */ + leadingComments?: (string|null); - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } + /** Location trailingComments */ + trailingComments?: (string|null); - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); + /** Represents a Location. */ + class Location implements ILocation { - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; + /** Location path. */ + public path: number[]; - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; + /** Location span. */ + public span: number[]; - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; + /** Location leadingComments. */ + public leadingComments: string; - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; + /** Location trailingComments. */ + public trailingComments: string; - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a RubySettings. */ - interface IRubySettings { + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); } - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new RubySettings. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.api.IRubySettings); + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new RubySettings instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns RubySettings instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RubySettings message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RubySettings + * @returns GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RubySettings + * @returns GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a RubySettings message. + * Verifies a GeneratedCodeInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RubySettings + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RubySettings to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RubySettings + * Gets the default type url for GeneratedCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GoSettings. */ - interface IGoSettings { + namespace GeneratedCodeInfo { - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } } - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new GoSettings. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.api.IGoSettings); + constructor(properties?: google.protobuf.ITimestamp); - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns GoSettings instance + * @returns Timestamp instance */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GoSettings + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoSettings + * @returns Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a GoSettings message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoSettings + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoSettings to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoSettings + * Gets the default type url for Timestamp * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); + /** Properties of a Duration. */ + interface IDuration { - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new MethodSettings. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; + constructor(properties?: google.protobuf.IDuration); - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** Duration seconds. */ + public seconds: (number|Long|string); - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; + /** Duration nanos. */ + public nanos: number; /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns MethodSettings instance + * @returns Duration instance */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodSettings + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodSettings + * @returns Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a MethodSettings message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodSettings + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodSettings to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for Duration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } } } diff --git a/packages/google-maps-places/protos/protos.js b/packages/google-maps-places/protos/protos.js index a037e78b5e5..74fd039fb63 100644 --- a/packages/google-maps-places/protos/protos.js +++ b/packages/google-maps-places/protos/protos.js @@ -39,34 +39,295 @@ */ var google = {}; - google.protobuf = (function() { + google.geo = (function() { /** - * Namespace protobuf. + * Namespace geo. * @memberof google * @namespace */ - var protobuf = {}; + var geo = {}; - protobuf.Timestamp = (function() { + geo.type = (function() { /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * Namespace type. + * @memberof google.geo + * @namespace + */ + var type = {}; + + type.Viewport = (function() { + + /** + * Properties of a Viewport. + * @memberof google.geo.type + * @interface IViewport + * @property {google.type.ILatLng|null} [low] Viewport low + * @property {google.type.ILatLng|null} [high] Viewport high + */ + + /** + * Constructs a new Viewport. + * @memberof google.geo.type + * @classdesc Represents a Viewport. + * @implements IViewport + * @constructor + * @param {google.geo.type.IViewport=} [properties] Properties to set + */ + function Viewport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Viewport low. + * @member {google.type.ILatLng|null|undefined} low + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.low = null; + + /** + * Viewport high. + * @member {google.type.ILatLng|null|undefined} high + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.high = null; + + /** + * Creates a new Viewport instance using the specified properties. + * @function create + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport=} [properties] Properties to set + * @returns {google.geo.type.Viewport} Viewport instance + */ + Viewport.create = function create(properties) { + return new Viewport(properties); + }; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encode + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @function decode + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.high = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Viewport message. + * @function verify + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Viewport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) { + var error = $root.google.type.LatLng.verify(message.low); + if (error) + return "low." + error; + } + if (message.high != null && message.hasOwnProperty("high")) { + var error = $root.google.type.LatLng.verify(message.high); + if (error) + return "high." + error; + } + return null; + }; + + /** + * Creates a Viewport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} object Plain object + * @returns {google.geo.type.Viewport} Viewport + */ + Viewport.fromObject = function fromObject(object) { + if (object instanceof $root.google.geo.type.Viewport) + return object; + var message = new $root.google.geo.type.Viewport(); + if (object.low != null) { + if (typeof object.low !== "object") + throw TypeError(".google.geo.type.Viewport.low: object expected"); + message.low = $root.google.type.LatLng.fromObject(object.low); + } + if (object.high != null) { + if (typeof object.high !== "object") + throw TypeError(".google.geo.type.Viewport.high: object expected"); + message.high = $root.google.type.LatLng.fromObject(object.high); + } + return message; + }; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.Viewport} message Viewport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Viewport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = null; + object.high = null; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = $root.google.type.LatLng.toObject(message.low, options); + if (message.high != null && message.hasOwnProperty("high")) + object.high = $root.google.type.LatLng.toObject(message.high, options); + return object; + }; + + /** + * Converts this Viewport to JSON. + * @function toJSON + * @memberof google.geo.type.Viewport + * @instance + * @returns {Object.} JSON object + */ + Viewport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Viewport + * @function getTypeUrl + * @memberof google.geo.type.Viewport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.geo.type.Viewport"; + }; + + return Viewport; + })(); + + return type; + })(); + + return geo; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.LatLng = (function() { + + /** + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude */ /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.type.ILatLng=} [properties] Properties to set */ - function Timestamp(properties) { + function LatLng(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -74,89 +335,89 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LatLng.prototype.latitude = 0; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng * @instance */ - Timestamp.prototype.nanos = 0; + LatLng.prototype.longitude = 0; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new LatLng instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.type.ILatLng=} [properties] Properties to set + * @returns {google.type.LatLng} LatLng instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + LatLng.create = function create(properties) { + return new LatLng(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.type.ILatLng} message LatLng message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + LatLng.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude); + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.type.ILatLng} message LatLng message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + LatLng.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a LatLng message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.type.LatLng} LatLng * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + LatLng.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.latitude = reader.double(); break; } case 2: { - message.nanos = reader.int32(); + message.longitude = reader.double(); break; } default: @@ -168,146 +429,132 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a LatLng message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.type.LatLng} LatLng * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + LatLng.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a LatLng message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + LatLng.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.latitude != null && message.hasOwnProperty("latitude")) + if (typeof message.latitude !== "number") + return "latitude: number expected"; + if (message.longitude != null && message.hasOwnProperty("longitude")) + if (typeof message.longitude !== "number") + return "longitude: number expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.type.LatLng} LatLng */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a LatLng message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.type.LatLng} message LatLng * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + LatLng.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.latitude = 0; + object.longitude = 0; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this LatLng to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + LatLng.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for LatLng * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.type.LatLng * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.type.LatLng"; }; - return Timestamp; + return LatLng; })(); - protobuf.FileDescriptorSet = (function() { + type.LocalizedText = (function() { /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * Properties of a LocalizedText. + * @memberof google.type + * @interface ILocalizedText + * @property {string|null} [text] LocalizedText text + * @property {string|null} [languageCode] LocalizedText languageCode */ /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * Constructs a new LocalizedText. + * @memberof google.type + * @classdesc Represents a LocalizedText. + * @implements ILocalizedText * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.type.ILocalizedText=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function LocalizedText(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -315,78 +562,89 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * LocalizedText text. + * @member {string} text + * @memberof google.type.LocalizedText * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + LocalizedText.prototype.text = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * LocalizedText languageCode. + * @member {string} languageCode + * @memberof google.type.LocalizedText + * @instance + */ + LocalizedText.prototype.languageCode = ""; + + /** + * Creates a new LocalizedText instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.type.ILocalizedText=} [properties] Properties to set + * @returns {google.type.LocalizedText} LocalizedText instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + LocalizedText.create = function create(properties) { + return new LocalizedText(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + LocalizedText.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); return writer; }; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + LocalizedText.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a LocalizedText message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.type.LocalizedText} LocalizedText * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + LocalizedText.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LocalizedText(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + message.text = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); break; } default: @@ -398,190 +656,133 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.type.LocalizedText} LocalizedText * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + LocalizedText.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a LocalizedText message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + LocalizedText.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.type.LocalizedText} LocalizedText */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + LocalizedText.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LocalizedText) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } + var message = new $root.google.type.LocalizedText(); + if (object.text != null) + message.text = String(object.text); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.type.LocalizedText} message LocalizedText * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + LocalizedText.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + if (options.defaults) { + object.text = ""; + object.languageCode = ""; } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this LocalizedText to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + LocalizedText.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for LocalizedText * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.type.LocalizedText * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LocalizedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + return typeUrlPrefix + "/google.type.LocalizedText"; }; - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; + return LocalizedText; })(); - protobuf.FileDescriptorProto = (function() { + type.Money = (function() { /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + * Properties of a Money. + * @memberof google.type + * @interface IMoney + * @property {string|null} [currencyCode] Money currencyCode + * @property {number|Long|null} [units] Money units + * @property {number|null} [nanos] Money nanos */ /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * Constructs a new Money. + * @memberof google.type + * @classdesc Represents a Money. + * @implements IMoney * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.type.IMoney=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function Money(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -589,274 +790,103 @@ } /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto + * Money currencyCode. + * @member {string} currencyCode + * @memberof google.type.Money * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + Money.prototype.currencyCode = ""; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Money units. + * @member {number|Long} units + * @memberof google.type.Money * @instance */ - FileDescriptorProto.prototype.syntax = ""; + Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto + * Money nanos. + * @member {number} nanos + * @memberof google.type.Money * @instance */ - FileDescriptorProto.prototype.edition = 0; + Money.prototype.nanos = 0; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new Money instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.type.IMoney=} [properties] Properties to set + * @returns {google.type.Money} Money instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + Money.create = function create(properties) { + return new Money(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.type.IMoney} message Money message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + Money.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); + if (message.units != null && Object.hasOwnProperty.call(message, "units")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); return writer; }; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.type.IMoney} message Money message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + Money.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a Money message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.type.Money} Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + Money.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.currencyCode = reader.string(); break; } case 2: { - message["package"] = reader.string(); + message.units = reader.int64(); break; } case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); + message.nanos = reader.int32(); break; } default: @@ -868,416 +898,155 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a Money message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.type.Money} Money * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + Money.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies a Money message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + Money.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.units != null && message.hasOwnProperty("units")) + if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) + return "units: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Money message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.type.Money} Money */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + Money.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Money) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } + var message = new $root.google.type.Money(); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + if (object.units != null) + if ($util.Long) + (message.units = $util.Long.fromValue(object.units)).unsigned = false; + else if (typeof object.units === "string") + message.units = parseInt(object.units, 10); + else if (typeof object.units === "number") + message.units = object.units; + else if (typeof object.units === "object") + message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a Money message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.type.Money} message Money * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + Money.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + object.currencyCode = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.units = options.longs === String ? "0" : 0; + object.nanos = 0; } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.units != null && message.hasOwnProperty("units")) + if (typeof message.units === "number") + object.units = options.longs === String ? String(message.units) : message.units; + else + object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Money to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + Money.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for Money * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.type.Money * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + return typeUrlPrefix + "/google.type.Money"; }; - return FileDescriptorProto; + return Money; })(); - protobuf.DescriptorProto = (function() { + type.Date = (function() { /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day */ /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.type.IDate=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1285,225 +1054,103 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * Date year. + * @member {number} year + * @memberof google.type.Date * @instance */ - DescriptorProto.prototype.options = null; + Date.prototype.year = 0; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * Date month. + * @member {number} month + * @memberof google.type.Date * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + Date.prototype.month = 0; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * Date day. + * @member {number} day + * @memberof google.type.Date * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + Date.prototype.day = 0; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new Date instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + Date.create = function create(properties) { + return new Date(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + Date.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); return writer; }; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + Date.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a Date message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + Date.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.year = reader.int32(); break; } case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.month = reader.int32(); break; } case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + message.day = reader.int32(); break; } default: @@ -1515,12798 +1162,9863 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a Date message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + Date.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a Date message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + Date.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; return null; }; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Date message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.type.Date} Date */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; return message; }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a Date message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.type.Date} message Date * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + Date.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + object.year = 0; + object.month = 0; + object.day = 0; } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this Date to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + Date.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for Date * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.type.Date * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.type.Date"; }; - DescriptorProto.ExtensionRange = (function() { + return Date; + })(); - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ + return type; + })(); - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + google.maps = (function() { - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Namespace maps. + * @memberof google + * @namespace + */ + var maps = {}; - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + maps.places = (function() { - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; + /** + * Namespace places. + * @memberof google.maps + * @namespace + */ + var places = {}; - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; + places.v1 = (function() { /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Namespace v1. + * @memberof google.maps.places + * @namespace */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + var v1 = {}; - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.AuthorAttribution = (function() { - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Properties of an AuthorAttribution. + * @memberof google.maps.places.v1 + * @interface IAuthorAttribution + * @property {string|null} [displayName] AuthorAttribution displayName + * @property {string|null} [uri] AuthorAttribution uri + * @property {string|null} [photoUri] AuthorAttribution photoUri + */ + + /** + * Constructs a new AuthorAttribution. + * @memberof google.maps.places.v1 + * @classdesc Represents an AuthorAttribution. + * @implements IAuthorAttribution + * @constructor + * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set + */ + function AuthorAttribution(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * AuthorAttribution displayName. + * @member {string} displayName + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.displayName = ""; - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + /** + * AuthorAttribution uri. + * @member {string} uri + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.uri = ""; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; + /** + * AuthorAttribution photoUri. + * @member {string} photoUri + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + */ + AuthorAttribution.prototype.photoUri = ""; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; + /** + * Creates a new AuthorAttribution instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution instance + */ + AuthorAttribution.create = function create(properties) { + return new AuthorAttribution(properties); + }; - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorAttribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.photoUri); + return writer; + }; - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; + /** + * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthorAttribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ExtensionRange; - })(); + /** + * Decodes an AuthorAttribution message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorAttribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AuthorAttribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.photoUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - DescriptorProto.ReservedRange = (function() { + /** + * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthorAttribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * Verifies an AuthorAttribution message. + * @function verify + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthorAttribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + if (!$util.isString(message.photoUri)) + return "photoUri: string expected"; + return null; + }; - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution + */ + AuthorAttribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AuthorAttribution) + return object; + var message = new $root.google.maps.places.v1.AuthorAttribution(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.photoUri != null) + message.photoUri = String(object.photoUri); + return message; + }; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {google.maps.places.v1.AuthorAttribution} message AuthorAttribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthorAttribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.photoUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + object.photoUri = message.photoUri; + return object; + }; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * Converts this AuthorAttribution to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AuthorAttribution + * @instance + * @returns {Object.} JSON object + */ + AuthorAttribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; + /** + * Gets the default type url for AuthorAttribution + * @function getTypeUrl + * @memberof google.maps.places.v1.AuthorAttribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthorAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AuthorAttribution"; + }; - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; + return AuthorAttribution; + })(); - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.ContentBlock = (function() { - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Properties of a ContentBlock. + * @memberof google.maps.places.v1 + * @interface IContentBlock + * @property {string|null} [topic] ContentBlock topic + * @property {google.type.ILocalizedText|null} [content] ContentBlock content + * @property {google.maps.places.v1.IReferences|null} [references] ContentBlock references + */ + + /** + * Constructs a new ContentBlock. + * @memberof google.maps.places.v1 + * @classdesc Represents a ContentBlock. + * @implements IContentBlock + * @constructor + * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set + */ + function ContentBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return message; - }; - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ContentBlock topic. + * @member {string} topic + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.topic = ""; - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + /** + * ContentBlock content. + * @member {google.type.ILocalizedText|null|undefined} content + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.content = null; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * ContentBlock references. + * @member {google.maps.places.v1.IReferences|null|undefined} references + * @memberof google.maps.places.v1.ContentBlock + * @instance + */ + ContentBlock.prototype.references = null; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; + /** + * Creates a new ContentBlock instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set + * @returns {google.maps.places.v1.ContentBlock} ContentBlock instance + */ + ContentBlock.create = function create(properties) { + return new ContentBlock(properties); + }; - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified ContentBlock message. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.type.LocalizedText.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; + /** + * Encodes the specified ContentBlock message, length delimited. Does not implicitly {@link google.maps.places.v1.ContentBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.IContentBlock} message ContentBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return ReservedRange; - })(); + /** + * Decodes a ContentBlock message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContentBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + case 2: { + message.content = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 3: { + message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return DescriptorProto; - })(); + /** + * Decodes a ContentBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.ExtensionRangeOptions = (function() { + /** + * Verifies a ContentBlock message. + * @function verify + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.type.LocalizedText.verify(message.content); + if (error) + return "content." + error; + } + if (message.references != null && message.hasOwnProperty("references")) { + var error = $root.google.maps.places.v1.References.verify(message.references); + if (error) + return "references." + error; + } + return null; + }; - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ + /** + * Creates a ContentBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContentBlock} ContentBlock + */ + ContentBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContentBlock) + return object; + var message = new $root.google.maps.places.v1.ContentBlock(); + if (object.topic != null) + message.topic = String(object.topic); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.maps.places.v1.ContentBlock.content: object expected"); + message.content = $root.google.type.LocalizedText.fromObject(object.content); + } + if (object.references != null) { + if (typeof object.references !== "object") + throw TypeError(".google.maps.places.v1.ContentBlock.references: object expected"); + message.references = $root.google.maps.places.v1.References.fromObject(object.references); + } + return message; + }; - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a ContentBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {google.maps.places.v1.ContentBlock} message ContentBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topic = ""; + object.content = null; + object.references = null; + } + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.type.LocalizedText.toObject(message.content, options); + if (message.references != null && message.hasOwnProperty("references")) + object.references = $root.google.maps.places.v1.References.toObject(message.references, options); + return object; + }; - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Converts this ContentBlock to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContentBlock + * @instance + * @returns {Object.} JSON object + */ + ContentBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + /** + * Gets the default type url for ContentBlock + * @function getTypeUrl + * @memberof google.maps.places.v1.ContentBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContentBlock"; + }; - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; + return ContentBlock; + })(); - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; + v1.References = (function() { - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; + /** + * Properties of a References. + * @memberof google.maps.places.v1 + * @interface IReferences + * @property {Array.|null} [reviews] References reviews + * @property {Array.|null} [places] References places + */ - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new References. + * @memberof google.maps.places.v1 + * @classdesc Represents a References. + * @implements IReferences + * @constructor + * @param {google.maps.places.v1.IReferences=} [properties] Properties to set + */ + function References(properties) { + this.reviews = []; + this.places = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * References reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.References + * @instance + */ + References.prototype.reviews = $util.emptyArray; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; + /** + * References places. + * @member {Array.} places + * @memberof google.maps.places.v1.References + * @instance + */ + References.prototype.places = $util.emptyArray; + + /** + * Creates a new References instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences=} [properties] Properties to set + * @returns {google.maps.places.v1.References} References instance + */ + References.create = function create(properties) { + return new References(properties); + }; + + /** + * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences} message References message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + References.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.places[i]); + return writer; + }; + + /** + * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.IReferences} message References message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + References.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a References message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.References + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.References} References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + References.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.References(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; + return message; + }; + + /** + * Decodes a References message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.References + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.References} References + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + References.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a References message. + * @function verify + * @memberof google.maps.places.v1.References + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + References.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } } - case 3: { - message.verification = reader.int32(); - break; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) + if (!$util.isString(message.places[i])) + return "places: string[] expected"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return null; + }; - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a References message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.References + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.References} References + */ + References.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.References) + return object; + var message = new $root.google.maps.places.v1.References(); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.References.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.References.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.References.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) + message.places[i] = String(object.places[i]); + } + return message; + }; - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; + /** + * Creates a plain object from a References message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.References + * @static + * @param {google.maps.places.v1.References} message References + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + References.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reviews = []; + object.places = []; + } + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); + } + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = message.places[j]; + } + return object; + }; - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; + /** + * Converts this References to JSON. + * @function toJSON + * @memberof google.maps.places.v1.References + * @instance + * @returns {Object.} JSON object + */ + References.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Gets the default type url for References + * @function getTypeUrl + * @memberof google.maps.places.v1.References + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + References.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.References"; + }; - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return References; + })(); - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; + v1.Review = (function() { - ExtensionRangeOptions.Declaration = (function() { + /** + * Properties of a Review. + * @memberof google.maps.places.v1 + * @interface IReview + * @property {string|null} [name] Review name + * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription + * @property {google.type.ILocalizedText|null} [text] Review text + * @property {google.type.ILocalizedText|null} [originalText] Review originalText + * @property {number|null} [rating] Review rating + * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution + * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime + */ - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ + /** + * Constructs a new Review. + * @memberof google.maps.places.v1 + * @classdesc Represents a Review. + * @implements IReview + * @constructor + * @param {google.maps.places.v1.IReview=} [properties] Properties to set + */ + function Review(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Review name. + * @member {string} name + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.name = ""; - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; + /** + * Review relativePublishTimeDescription. + * @member {string} relativePublishTimeDescription + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.relativePublishTimeDescription = ""; - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; + /** + * Review text. + * @member {google.type.ILocalizedText|null|undefined} text + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.text = null; - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; + /** + * Review originalText. + * @member {google.type.ILocalizedText|null|undefined} originalText + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.originalText = null; - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; + /** + * Review rating. + * @member {number} rating + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.rating = 0; - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; + /** + * Review authorAttribution. + * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.authorAttribution = null; - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; + /** + * Review publishTime. + * @member {google.protobuf.ITimestamp|null|undefined} publishTime + * @memberof google.maps.places.v1.Review + * @instance + */ + Review.prototype.publishTime = null; - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; + /** + * Creates a new Review instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview=} [properties] Properties to set + * @returns {google.maps.places.v1.Review} Review instance + */ + Review.create = function create(properties) { + return new Review(properties); + }; - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText")) + $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution")) + $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) + $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Review message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.relativePublishTimeDescription = reader.string(); + break; + } + case 9: { + message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 12: { + message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 7: { + message.rating = reader.double(); + break; + } + case 13: { + message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()); + break; + } + case 14: { + message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; + /** + * Verifies a Review message. + * @function verify + * @memberof google.maps.places.v1.Review + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Review.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + if (!$util.isString(message.relativePublishTimeDescription)) + return "relativePublishTimeDescription: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.type.LocalizedText.verify(message.text); + if (error) + return "text." + error; + } + if (message.originalText != null && message.hasOwnProperty("originalText")) { + var error = $root.google.type.LocalizedText.verify(message.originalText); + if (error) + return "originalText." + error; + } + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) { + var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution); + if (error) + return "authorAttribution." + error; + } + if (message.publishTime != null && message.hasOwnProperty("publishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.publishTime); + if (error) + return "publishTime." + error; + } + return null; + }; - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a Review message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Review + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Review} Review + */ + Review.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Review) + return object; + var message = new $root.google.maps.places.v1.Review(); + if (object.name != null) + message.name = String(object.name); + if (object.relativePublishTimeDescription != null) + message.relativePublishTimeDescription = String(object.relativePublishTimeDescription); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.Review.text: object expected"); + message.text = $root.google.type.LocalizedText.fromObject(object.text); + } + if (object.originalText != null) { + if (typeof object.originalText !== "object") + throw TypeError(".google.maps.places.v1.Review.originalText: object expected"); + message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText); + } + if (object.rating != null) + message.rating = Number(object.rating); + if (object.authorAttribution != null) { + if (typeof object.authorAttribution !== "object") + throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected"); + message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution); + } + if (object.publishTime != null) { + if (typeof object.publishTime !== "object") + throw TypeError(".google.maps.places.v1.Review.publishTime: object expected"); + message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime); + } + return message; + }; - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Review + * @static + * @param {google.maps.places.v1.Review} message Review + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Review.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.relativePublishTimeDescription = ""; + object.rating = 0; + object.text = null; + object.originalText = null; + object.authorAttribution = null; + object.publishTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + object.relativePublishTimeDescription = message.relativePublishTimeDescription; + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.type.LocalizedText.toObject(message.text, options); + if (message.originalText != null && message.hasOwnProperty("originalText")) + object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options); + if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) + object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options); + if (message.publishTime != null && message.hasOwnProperty("publishTime")) + object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options); + return object; + }; - return Declaration; - })(); + /** + * Converts this Review to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Review + * @instance + * @returns {Object.} JSON object + */ + Review.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); + /** + * Gets the default type url for Review + * @function getTypeUrl + * @memberof google.maps.places.v1.Review + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Review"; + }; - return ExtensionRangeOptions; - })(); + return Review; + })(); - protobuf.FieldDescriptorProto = (function() { + v1.ContextualContent = (function() { - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ + /** + * Properties of a ContextualContent. + * @memberof google.maps.places.v1 + * @interface IContextualContent + * @property {Array.|null} [reviews] ContextualContent reviews + * @property {Array.|null} [photos] ContextualContent photos + * @property {Array.|null} [justifications] ContextualContent justifications + */ - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new ContextualContent. + * @memberof google.maps.places.v1 + * @classdesc Represents a ContextualContent. + * @implements IContextualContent + * @constructor + * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set + */ + function ContextualContent(properties) { + this.reviews = []; + this.photos = []; + this.justifications = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; + /** + * ContextualContent reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.reviews = $util.emptyArray; - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; + /** + * ContextualContent photos. + * @member {Array.} photos + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.photos = $util.emptyArray; - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; + /** + * ContextualContent justifications. + * @member {Array.} justifications + * @memberof google.maps.places.v1.ContextualContent + * @instance + */ + ContextualContent.prototype.justifications = $util.emptyArray; - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; + /** + * Creates a new ContextualContent instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent} ContextualContent instance + */ + ContextualContent.create = function create(properties) { + return new ContextualContent(properties); + }; - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; + /** + * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextualContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.photos != null && message.photos.length) + for (var i = 0; i < message.photos.length; ++i) + $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.justifications != null && message.justifications.length) + for (var i = 0; i < message.justifications.length; ++i) + $root.google.maps.places.v1.ContextualContent.Justification.encode(message.justifications[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + /** + * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextualContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + /** + * Decodes a ContextualContent message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextualContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.photos && message.photos.length)) + message.photos = []; + message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.justifications && message.justifications.length)) + message.justifications = []; + message.justifications.push($root.google.maps.places.v1.ContextualContent.Justification.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + /** + * Decodes a ContextualContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextualContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; + /** + * Verifies a ContextualContent message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextualContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } + } + if (message.photos != null && message.hasOwnProperty("photos")) { + if (!Array.isArray(message.photos)) + return "photos: array expected"; + for (var i = 0; i < message.photos.length; ++i) { + var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); + if (error) + return "photos." + error; + } + } + if (message.justifications != null && message.hasOwnProperty("justifications")) { + if (!Array.isArray(message.justifications)) + return "justifications: array expected"; + for (var i = 0; i < message.justifications.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.verify(message.justifications[i]); + if (error) + return "justifications." + error; + } + } + return null; + }; - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; + /** + * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent} ContextualContent + */ + ContextualContent.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent) + return object; + var message = new $root.google.maps.places.v1.ContextualContent(); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.ContextualContent.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.photos) { + if (!Array.isArray(object.photos)) + throw TypeError(".google.maps.places.v1.ContextualContent.photos: array expected"); + message.photos = []; + for (var i = 0; i < object.photos.length; ++i) { + if (typeof object.photos[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.photos: object expected"); + message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); + } + } + if (object.justifications) { + if (!Array.isArray(object.justifications)) + throw TypeError(".google.maps.places.v1.ContextualContent.justifications: array expected"); + message.justifications = []; + for (var i = 0; i < object.justifications.length; ++i) { + if (typeof object.justifications[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.justifications: object expected"); + message.justifications[i] = $root.google.maps.places.v1.ContextualContent.Justification.fromObject(object.justifications[i]); + } + } + return message; + }; - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; + /** + * Creates a plain object from a ContextualContent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {google.maps.places.v1.ContextualContent} message ContextualContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextualContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reviews = []; + object.photos = []; + object.justifications = []; } - case 7: { - message.defaultValue = reader.string(); - break; + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); } - case 9: { - message.oneofIndex = reader.int32(); - break; + if (message.photos && message.photos.length) { + object.photos = []; + for (var j = 0; j < message.photos.length; ++j) + object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); } - case 10: { - message.jsonName = reader.string(); - break; + if (message.justifications && message.justifications.length) { + object.justifications = []; + for (var j = 0; j < message.justifications.length; ++j) + object.justifications[j] = $root.google.maps.places.v1.ContextualContent.Justification.toObject(message.justifications[j], options); } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; + return object; + }; + + /** + * Converts this ContextualContent to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent + * @instance + * @returns {Object.} JSON object + */ + ContextualContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContextualContent + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContextualContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - case 17: { - message.proto3Optional = reader.bool(); - break; + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent"; + }; + + ContextualContent.Justification = (function() { + + /** + * Properties of a Justification. + * @memberof google.maps.places.v1.ContextualContent + * @interface IJustification + * @property {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null} [reviewJustification] Justification reviewJustification + * @property {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null} [businessAvailabilityAttributesJustification] Justification businessAvailabilityAttributesJustification + */ + + /** + * Constructs a new Justification. + * @memberof google.maps.places.v1.ContextualContent + * @classdesc Represents a Justification. + * @implements IJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set + */ + function Justification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Justification reviewJustification. + * @member {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null|undefined} reviewJustification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Justification.prototype.reviewJustification = null; - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; + /** + * Justification businessAvailabilityAttributesJustification. + * @member {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null|undefined} businessAvailabilityAttributesJustification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Justification.prototype.businessAvailabilityAttributesJustification = null; - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; + /** + * Justification justification. + * @member {"reviewJustification"|"businessAvailabilityAttributesJustification"|undefined} justification + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + */ + Object.defineProperty(Justification.prototype, "justification", { + get: $util.oneOfGetter($oneOfFields = ["reviewJustification", "businessAvailabilityAttributesJustification"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new Justification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification instance + */ + Justification.create = function create(properties) { + return new Justification(properties); + }; - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; + /** + * Encodes the specified Justification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Justification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reviewJustification != null && Object.hasOwnProperty.call(message, "reviewJustification")) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.encode(message.reviewJustification, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.businessAvailabilityAttributesJustification != null && Object.hasOwnProperty.call(message, "businessAvailabilityAttributesJustification")) + $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.encode(message.businessAvailabilityAttributesJustification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); + /** + * Encodes the specified Justification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.IJustification} message Justification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Justification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); + /** + * Decodes a Justification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Justification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.decode(reader, reader.uint32()); + break; + } + case 2: { + message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return FieldDescriptorProto; - })(); + /** + * Decodes a Justification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Justification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.OneofDescriptorProto = (function() { + /** + * Verifies a Justification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Justification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { + properties.justification = 1; + { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify(message.reviewJustification); + if (error) + return "reviewJustification." + error; + } + } + if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { + if (properties.justification === 1) + return "justification: multiple values"; + properties.justification = 1; + { + var error = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify(message.businessAvailabilityAttributesJustification); + if (error) + return "businessAvailabilityAttributesJustification." + error; + } + } + return null; + }; - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * Creates a Justification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification} Justification + */ + Justification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification(); + if (object.reviewJustification != null) { + if (typeof object.reviewJustification !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.reviewJustification: object expected"); + message.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.fromObject(object.reviewJustification); + } + if (object.businessAvailabilityAttributesJustification != null) { + if (typeof object.businessAvailabilityAttributesJustification !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.businessAvailabilityAttributesJustification: object expected"); + message.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.fromObject(object.businessAvailabilityAttributesJustification); + } + return message; + }; - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a Justification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification} message Justification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Justification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.reviewJustification != null && message.hasOwnProperty("reviewJustification")) { + object.reviewJustification = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.toObject(message.reviewJustification, options); + if (options.oneofs) + object.justification = "reviewJustification"; + } + if (message.businessAvailabilityAttributesJustification != null && message.hasOwnProperty("businessAvailabilityAttributesJustification")) { + object.businessAvailabilityAttributesJustification = $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.toObject(message.businessAvailabilityAttributesJustification, options); + if (options.oneofs) + object.justification = "businessAvailabilityAttributesJustification"; + } + return object; + }; - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * Converts this Justification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification + * @instance + * @returns {Object.} JSON object + */ + Justification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * Gets the default type url for Justification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Justification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification"; + }; - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; + Justification.ReviewJustification = (function() { - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Properties of a ReviewJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @interface IReviewJustification + * @property {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null} [highlightedText] ReviewJustification highlightedText + * @property {google.maps.places.v1.IReview|null} [review] ReviewJustification review + */ - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new ReviewJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @classdesc Represents a ReviewJustification. + * @implements IReviewJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set + */ + function ReviewJustification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ReviewJustification highlightedText. + * @member {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText|null|undefined} highlightedText + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + */ + ReviewJustification.prototype.highlightedText = null; - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ReviewJustification review. + * @member {google.maps.places.v1.IReview|null|undefined} review + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + */ + ReviewJustification.prototype.review = null; - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + /** + * Creates a new ReviewJustification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification instance + */ + ReviewJustification.create = function create(properties) { + return new ReviewJustification(properties); + }; - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; + /** + * Encodes the specified ReviewJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewJustification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.highlightedText != null && Object.hasOwnProperty.call(message, "highlightedText")) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.encode(message.highlightedText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.review != null && Object.hasOwnProperty.call(message, "review")) + $root.google.maps.places.v1.Review.encode(message.review, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; + /** + * Encodes the specified ReviewJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IReviewJustification} message ReviewJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReviewJustification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ReviewJustification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewJustification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.review = $root.google.maps.places.v1.Review.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; + /** + * Decodes a ReviewJustification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReviewJustification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return OneofDescriptorProto; - })(); + /** + * Verifies a ReviewJustification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReviewJustification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify(message.highlightedText); + if (error) + return "highlightedText." + error; + } + if (message.review != null && message.hasOwnProperty("review")) { + var error = $root.google.maps.places.v1.Review.verify(message.review); + if (error) + return "review." + error; + } + return null; + }; - protobuf.EnumDescriptorProto = (function() { + /** + * Creates a ReviewJustification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} ReviewJustification + */ + ReviewJustification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification(); + if (object.highlightedText != null) { + if (typeof object.highlightedText !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.highlightedText: object expected"); + message.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.fromObject(object.highlightedText); + } + if (object.review != null) { + if (typeof object.review !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.review: object expected"); + message.review = $root.google.maps.places.v1.Review.fromObject(object.review); + } + return message; + }; - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ + /** + * Creates a plain object from a ReviewJustification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification} message ReviewJustification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReviewJustification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.highlightedText = null; + object.review = null; + } + if (message.highlightedText != null && message.hasOwnProperty("highlightedText")) + object.highlightedText = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.toObject(message.highlightedText, options); + if (message.review != null && message.hasOwnProperty("review")) + object.review = $root.google.maps.places.v1.Review.toObject(message.review, options); + return object; + }; - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this ReviewJustification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @instance + * @returns {Object.} JSON object + */ + ReviewJustification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + /** + * Gets the default type url for ReviewJustification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReviewJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification"; + }; - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + ReviewJustification.HighlightedText = (function() { - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Properties of a HighlightedText. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @interface IHighlightedText + * @property {string|null} [text] HighlightedText text + * @property {Array.|null} [highlightedTextRanges] HighlightedText highlightedTextRanges + */ - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + /** + * Constructs a new HighlightedText. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification + * @classdesc Represents a HighlightedText. + * @implements IHighlightedText + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set + */ + function HighlightedText(properties) { + this.highlightedTextRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * HighlightedText text. + * @member {string} text + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + */ + HighlightedText.prototype.text = ""; - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; + /** + * HighlightedText highlightedTextRanges. + * @member {Array.} highlightedTextRanges + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + */ + HighlightedText.prototype.highlightedTextRanges = $util.emptyArray; - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; + /** + * Creates a new HighlightedText instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText instance + */ + HighlightedText.create = function create(properties) { + return new HighlightedText(properties); + }; - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified HighlightedText message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.highlightedTextRanges != null && message.highlightedTextRanges.length) + for (var i = 0; i < message.highlightedTextRanges.length; ++i) + $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.encode(message.highlightedTextRanges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified HighlightedText message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.IHighlightedText} message HighlightedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a HighlightedText message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.highlightedTextRanges && message.highlightedTextRanges.length)) + message.highlightedTextRanges = []; + message.highlightedTextRanges.push($root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; + /** + * Decodes a HighlightedText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; + /** + * Verifies a HighlightedText message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HighlightedText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.highlightedTextRanges != null && message.hasOwnProperty("highlightedTextRanges")) { + if (!Array.isArray(message.highlightedTextRanges)) + return "highlightedTextRanges: array expected"; + for (var i = 0; i < message.highlightedTextRanges.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify(message.highlightedTextRanges[i]); + if (error) + return "highlightedTextRanges." + error; + } + } + return null; + }; - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; + /** + * Creates a HighlightedText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} HighlightedText + */ + HighlightedText.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText(); + if (object.text != null) + message.text = String(object.text); + if (object.highlightedTextRanges) { + if (!Array.isArray(object.highlightedTextRanges)) + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: array expected"); + message.highlightedTextRanges = []; + for (var i = 0; i < object.highlightedTextRanges.length; ++i) { + if (typeof object.highlightedTextRanges[i] !== "object") + throw TypeError(".google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.highlightedTextRanges: object expected"); + message.highlightedTextRanges[i] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.fromObject(object.highlightedTextRanges[i]); + } + } + return message; + }; - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a HighlightedText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText} message HighlightedText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HighlightedText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.highlightedTextRanges = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.highlightedTextRanges && message.highlightedTextRanges.length) { + object.highlightedTextRanges = []; + for (var j = 0; j < message.highlightedTextRanges.length; ++j) + object.highlightedTextRanges[j] = $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.toObject(message.highlightedTextRanges[j], options); + } + return object; + }; - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; + /** + * Converts this HighlightedText to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @instance + * @returns {Object.} JSON object + */ + HighlightedText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - EnumDescriptorProto.EnumReservedRange = (function() { + /** + * Gets the default type url for HighlightedText + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HighlightedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText"; + }; - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ + HighlightedText.HighlightedTextRange = (function() { + + /** + * Properties of a HighlightedTextRange. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @interface IHighlightedTextRange + * @property {number|null} [startIndex] HighlightedTextRange startIndex + * @property {number|null} [endIndex] HighlightedTextRange endIndex + */ + + /** + * Constructs a new HighlightedTextRange. + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText + * @classdesc Represents a HighlightedTextRange. + * @implements IHighlightedTextRange + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set + */ + function HighlightedTextRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * HighlightedTextRange startIndex. + * @member {number} startIndex + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + */ + HighlightedTextRange.prototype.startIndex = 0; + + /** + * HighlightedTextRange endIndex. + * @member {number} endIndex + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + */ + HighlightedTextRange.prototype.endIndex = 0; + + /** + * Creates a new HighlightedTextRange instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange instance + */ + HighlightedTextRange.create = function create(properties) { + return new HighlightedTextRange(properties); + }; + + /** + * Encodes the specified HighlightedTextRange message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedTextRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startIndex != null && Object.hasOwnProperty.call(message, "startIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startIndex); + if (message.endIndex != null && Object.hasOwnProperty.call(message, "endIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endIndex); + return writer; + }; + + /** + * Encodes the specified HighlightedTextRange message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.IHighlightedTextRange} message HighlightedTextRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HighlightedTextRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedTextRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startIndex = reader.int32(); + break; + } + case 2: { + message.endIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HighlightedTextRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HighlightedTextRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HighlightedTextRange message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HighlightedTextRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) + if (!$util.isInteger(message.startIndex)) + return "startIndex: integer expected"; + if (message.endIndex != null && message.hasOwnProperty("endIndex")) + if (!$util.isInteger(message.endIndex)) + return "endIndex: integer expected"; + return null; + }; + + /** + * Creates a HighlightedTextRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} HighlightedTextRange + */ + HighlightedTextRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange(); + if (object.startIndex != null) + message.startIndex = object.startIndex | 0; + if (object.endIndex != null) + message.endIndex = object.endIndex | 0; + return message; + }; + + /** + * Creates a plain object from a HighlightedTextRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange} message HighlightedTextRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HighlightedTextRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startIndex = 0; + object.endIndex = 0; + } + if (message.startIndex != null && message.hasOwnProperty("startIndex")) + object.startIndex = message.startIndex; + if (message.endIndex != null && message.hasOwnProperty("endIndex")) + object.endIndex = message.endIndex; + return object; + }; + + /** + * Converts this HighlightedTextRange to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @instance + * @returns {Object.} JSON object + */ + HighlightedTextRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HighlightedTextRange + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HighlightedTextRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.ReviewJustification.HighlightedText.HighlightedTextRange"; + }; - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; + return HighlightedTextRange; + })(); - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; + return HighlightedText; + })(); - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; + return ReviewJustification; + })(); - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; + Justification.BusinessAvailabilityAttributesJustification = (function() { - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a BusinessAvailabilityAttributesJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @interface IBusinessAvailabilityAttributesJustification + * @property {boolean|null} [takeout] BusinessAvailabilityAttributesJustification takeout + * @property {boolean|null} [delivery] BusinessAvailabilityAttributesJustification delivery + * @property {boolean|null} [dineIn] BusinessAvailabilityAttributesJustification dineIn + */ - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; + /** + * Constructs a new BusinessAvailabilityAttributesJustification. + * @memberof google.maps.places.v1.ContextualContent.Justification + * @classdesc Represents a BusinessAvailabilityAttributesJustification. + * @implements IBusinessAvailabilityAttributesJustification + * @constructor + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set + */ + function BusinessAvailabilityAttributesJustification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * BusinessAvailabilityAttributesJustification takeout. + * @member {boolean} takeout + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.takeout = false; - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + /** + * BusinessAvailabilityAttributesJustification delivery. + * @member {boolean} delivery + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.delivery = false; - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * BusinessAvailabilityAttributesJustification dineIn. + * @member {boolean} dineIn + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + */ + BusinessAvailabilityAttributesJustification.prototype.dineIn = false; - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; + /** + * Creates a new BusinessAvailabilityAttributesJustification instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification=} [properties] Properties to set + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification instance + */ + BusinessAvailabilityAttributesJustification.create = function create(properties) { + return new BusinessAvailabilityAttributesJustification(properties); + }; - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BusinessAvailabilityAttributesJustification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.takeout); + if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.delivery); + if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dineIn); + return writer; + }; - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; + /** + * Encodes the specified BusinessAvailabilityAttributesJustification message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BusinessAvailabilityAttributesJustification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return EnumReservedRange; - })(); + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BusinessAvailabilityAttributesJustification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.takeout = reader.bool(); + break; + } + case 2: { + message.delivery = reader.bool(); + break; + } + case 3: { + message.dineIn = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return EnumDescriptorProto; - })(); + /** + * Decodes a BusinessAvailabilityAttributesJustification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BusinessAvailabilityAttributesJustification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - protobuf.EnumValueDescriptorProto = (function() { + /** + * Verifies a BusinessAvailabilityAttributesJustification message. + * @function verify + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BusinessAvailabilityAttributesJustification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.takeout != null && message.hasOwnProperty("takeout")) + if (typeof message.takeout !== "boolean") + return "takeout: boolean expected"; + if (message.delivery != null && message.hasOwnProperty("delivery")) + if (typeof message.delivery !== "boolean") + return "delivery: boolean expected"; + if (message.dineIn != null && message.hasOwnProperty("dineIn")) + if (typeof message.dineIn !== "boolean") + return "dineIn: boolean expected"; + return null; + }; - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ + /** + * Creates a BusinessAvailabilityAttributesJustification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} BusinessAvailabilityAttributesJustification + */ + BusinessAvailabilityAttributesJustification.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification) + return object; + var message = new $root.google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification(); + if (object.takeout != null) + message.takeout = Boolean(object.takeout); + if (object.delivery != null) + message.delivery = Boolean(object.delivery); + if (object.dineIn != null) + message.dineIn = Boolean(object.dineIn); + return message; + }; - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a BusinessAvailabilityAttributesJustification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification} message BusinessAvailabilityAttributesJustification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BusinessAvailabilityAttributesJustification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.takeout = false; + object.delivery = false; + object.dineIn = false; + } + if (message.takeout != null && message.hasOwnProperty("takeout")) + object.takeout = message.takeout; + if (message.delivery != null && message.hasOwnProperty("delivery")) + object.delivery = message.delivery; + if (message.dineIn != null && message.hasOwnProperty("dineIn")) + object.dineIn = message.dineIn; + return object; + }; - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; + /** + * Converts this BusinessAvailabilityAttributesJustification to JSON. + * @function toJSON + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @instance + * @returns {Object.} JSON object + */ + BusinessAvailabilityAttributesJustification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; + /** + * Gets the default type url for BusinessAvailabilityAttributesJustification + * @function getTypeUrl + * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BusinessAvailabilityAttributesJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification"; + }; - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; + return BusinessAvailabilityAttributesJustification; + })(); - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; + return Justification; + })(); - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + return ContextualContent; + })(); - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.Photo = (function() { - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a Photo. + * @memberof google.maps.places.v1 + * @interface IPhoto + * @property {string|null} [name] Photo name + * @property {number|null} [widthPx] Photo widthPx + * @property {number|null} [heightPx] Photo heightPx + * @property {Array.|null} [authorAttributions] Photo authorAttributions + */ + + /** + * Constructs a new Photo. + * @memberof google.maps.places.v1 + * @classdesc Represents a Photo. + * @implements IPhoto + * @constructor + * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set + */ + function Photo(properties) { + this.authorAttributions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - return message; - }; - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Photo name. + * @member {string} name + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.name = ""; - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; + /** + * Photo widthPx. + * @member {number} widthPx + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.widthPx = 0; - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; + /** + * Photo heightPx. + * @member {number} heightPx + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.heightPx = 0; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Photo authorAttributions. + * @member {Array.} authorAttributions + * @memberof google.maps.places.v1.Photo + * @instance + */ + Photo.prototype.authorAttributions = $util.emptyArray; - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; + /** + * Creates a new Photo instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set + * @returns {google.maps.places.v1.Photo} Photo instance + */ + Photo.create = function create(properties) { + return new Photo(properties); + }; - return EnumValueDescriptorProto; - })(); + /** + * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Photo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx); + if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx); + if (message.authorAttributions != null && message.authorAttributions.length) + for (var i = 0; i < message.authorAttributions.length; ++i) + $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - protobuf.ServiceDescriptorProto = (function() { + /** + * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Photo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ + /** + * Decodes a Photo message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Photo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Photo} Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Photo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.widthPx = reader.int32(); + break; + } + case 3: { + message.heightPx = reader.int32(); + break; + } + case 4: { + if (!(message.authorAttributions && message.authorAttributions.length)) + message.authorAttributions = []; + message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a Photo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Photo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Photo} Photo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Photo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * Verifies a Photo message. + * @function verify + * @memberof google.maps.places.v1.Photo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Photo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + if (!$util.isInteger(message.widthPx)) + return "widthPx: integer expected"; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + if (!$util.isInteger(message.heightPx)) + return "heightPx: integer expected"; + if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) { + if (!Array.isArray(message.authorAttributions)) + return "authorAttributions: array expected"; + for (var i = 0; i < message.authorAttributions.length; ++i) { + var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]); + if (error) + return "authorAttributions." + error; + } + } + return null; + }; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + /** + * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Photo + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Photo} Photo + */ + Photo.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Photo) + return object; + var message = new $root.google.maps.places.v1.Photo(); + if (object.name != null) + message.name = String(object.name); + if (object.widthPx != null) + message.widthPx = object.widthPx | 0; + if (object.heightPx != null) + message.heightPx = object.heightPx | 0; + if (object.authorAttributions) { + if (!Array.isArray(object.authorAttributions)) + throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected"); + message.authorAttributions = []; + for (var i = 0; i < object.authorAttributions.length; ++i) { + if (typeof object.authorAttributions[i] !== "object") + throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected"); + message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]); + } + } + return message; + }; - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + /** + * Creates a plain object from a Photo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Photo + * @static + * @param {google.maps.places.v1.Photo} message Photo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Photo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.authorAttributions = []; + if (options.defaults) { + object.name = ""; + object.widthPx = 0; + object.heightPx = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.widthPx != null && message.hasOwnProperty("widthPx")) + object.widthPx = message.widthPx; + if (message.heightPx != null && message.hasOwnProperty("heightPx")) + object.heightPx = message.heightPx; + if (message.authorAttributions && message.authorAttributions.length) { + object.authorAttributions = []; + for (var j = 0; j < message.authorAttributions.length; ++j) + object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options); + } + return object; + }; - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; + /** + * Converts this Photo to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Photo + * @instance + * @returns {Object.} JSON object + */ + Photo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Gets the default type url for Photo + * @function getTypeUrl + * @memberof google.maps.places.v1.Photo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Photo"; + }; - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Photo; + })(); - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.EVChargeOptions = (function() { - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a EVChargeOptions. + * @memberof google.maps.places.v1 + * @interface IEVChargeOptions + * @property {number|null} [connectorCount] EVChargeOptions connectorCount + * @property {Array.|null} [connectorAggregation] EVChargeOptions connectorAggregation + */ - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; + /** + * Constructs a new EVChargeOptions. + * @memberof google.maps.places.v1 + * @classdesc Represents a EVChargeOptions. + * @implements IEVChargeOptions + * @constructor + * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set + */ + function EVChargeOptions(properties) { + this.connectorAggregation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; + /** + * EVChargeOptions connectorCount. + * @member {number} connectorCount + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + */ + EVChargeOptions.prototype.connectorCount = 0; - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; + /** + * EVChargeOptions connectorAggregation. + * @member {Array.} connectorAggregation + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + */ + EVChargeOptions.prototype.connectorAggregation = $util.emptyArray; - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new EVChargeOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions instance + */ + EVChargeOptions.create = function create(properties) { + return new EVChargeOptions(properties); + }; - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; + /** + * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVChargeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectorCount != null && Object.hasOwnProperty.call(message, "connectorCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectorCount); + if (message.connectorAggregation != null && message.connectorAggregation.length) + for (var i = 0; i < message.connectorAggregation.length; ++i) + $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.encode(message.connectorAggregation[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - return ServiceDescriptorProto; - })(); + /** + * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVChargeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.MethodDescriptorProto = (function() { + /** + * Decodes a EVChargeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVChargeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectorCount = reader.int32(); + break; + } + case 2: { + if (!(message.connectorAggregation && message.connectorAggregation.length)) + message.connectorAggregation = []; + message.connectorAggregation.push($root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ + /** + * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVChargeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a EVChargeOptions message. + * @function verify + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EVChargeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) + if (!$util.isInteger(message.connectorCount)) + return "connectorCount: integer expected"; + if (message.connectorAggregation != null && message.hasOwnProperty("connectorAggregation")) { + if (!Array.isArray(message.connectorAggregation)) + return "connectorAggregation: array expected"; + for (var i = 0; i < message.connectorAggregation.length; ++i) { + var error = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify(message.connectorAggregation[i]); + if (error) + return "connectorAggregation." + error; + } + } + return null; + }; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + /** + * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions + */ + EVChargeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.EVChargeOptions) + return object; + var message = new $root.google.maps.places.v1.EVChargeOptions(); + if (object.connectorCount != null) + message.connectorCount = object.connectorCount | 0; + if (object.connectorAggregation) { + if (!Array.isArray(object.connectorAggregation)) + throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: array expected"); + message.connectorAggregation = []; + for (var i = 0; i < object.connectorAggregation.length; ++i) { + if (typeof object.connectorAggregation[i] !== "object") + throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: object expected"); + message.connectorAggregation[i] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.fromObject(object.connectorAggregation[i]); + } + } + return message; + }; - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + /** + * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {google.maps.places.v1.EVChargeOptions} message EVChargeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EVChargeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectorAggregation = []; + if (options.defaults) + object.connectorCount = 0; + if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) + object.connectorCount = message.connectorCount; + if (message.connectorAggregation && message.connectorAggregation.length) { + object.connectorAggregation = []; + for (var j = 0; j < message.connectorAggregation.length; ++j) + object.connectorAggregation[j] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.toObject(message.connectorAggregation[j], options); + } + return object; + }; - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * Converts this EVChargeOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.EVChargeOptions + * @instance + * @returns {Object.} JSON object + */ + EVChargeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Gets the default type url for EVChargeOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.EVChargeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EVChargeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions"; + }; - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + EVChargeOptions.ConnectorAggregation = (function() { - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Properties of a ConnectorAggregation. + * @memberof google.maps.places.v1.EVChargeOptions + * @interface IConnectorAggregation + * @property {google.maps.places.v1.EVConnectorType|null} [type] ConnectorAggregation type + * @property {number|null} [maxChargeRateKw] ConnectorAggregation maxChargeRateKw + * @property {number|null} [count] ConnectorAggregation count + * @property {number|null} [availableCount] ConnectorAggregation availableCount + * @property {number|null} [outOfServiceCount] ConnectorAggregation outOfServiceCount + * @property {google.protobuf.ITimestamp|null} [availabilityLastUpdateTime] ConnectorAggregation availabilityLastUpdateTime + */ - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; + /** + * Constructs a new ConnectorAggregation. + * @memberof google.maps.places.v1.EVChargeOptions + * @classdesc Represents a ConnectorAggregation. + * @implements IConnectorAggregation + * @constructor + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set + */ + function ConnectorAggregation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; + /** + * ConnectorAggregation type. + * @member {google.maps.places.v1.EVConnectorType} type + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.type = 0; - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ConnectorAggregation maxChargeRateKw. + * @member {number} maxChargeRateKw + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.maxChargeRateKw = 0; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ConnectorAggregation count. + * @member {number} count + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.count = 0; - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; + /** + * ConnectorAggregation availableCount. + * @member {number|null|undefined} availableCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.availableCount = null; - return MethodDescriptorProto; - })(); + /** + * ConnectorAggregation outOfServiceCount. + * @member {number|null|undefined} outOfServiceCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.outOfServiceCount = null; - protobuf.FileOptions = (function() { + /** + * ConnectorAggregation availabilityLastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} availabilityLastUpdateTime + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + ConnectorAggregation.prototype.availabilityLastUpdateTime = null; - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ConnectorAggregation _availableCount. + * @member {"availableCount"|undefined} _availableCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + Object.defineProperty(ConnectorAggregation.prototype, "_availableCount", { + get: $util.oneOfGetter($oneOfFields = ["availableCount"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * ConnectorAggregation _outOfServiceCount. + * @member {"outOfServiceCount"|undefined} _outOfServiceCount + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + */ + Object.defineProperty(ConnectorAggregation.prototype, "_outOfServiceCount", { + get: $util.oneOfGetter($oneOfFields = ["outOfServiceCount"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * Creates a new ConnectorAggregation instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation instance + */ + ConnectorAggregation.create = function create(properties) { + return new ConnectorAggregation(properties); + }; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectorAggregation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.maxChargeRateKw != null && Object.hasOwnProperty.call(message, "maxChargeRateKw")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.maxChargeRateKw); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.count); + if (message.availableCount != null && Object.hasOwnProperty.call(message, "availableCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.availableCount); + if (message.outOfServiceCount != null && Object.hasOwnProperty.call(message, "outOfServiceCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.outOfServiceCount); + if (message.availabilityLastUpdateTime != null && Object.hasOwnProperty.call(message, "availabilityLastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.availabilityLastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectorAggregation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectorAggregation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.maxChargeRateKw = reader.double(); + break; + } + case 3: { + message.count = reader.int32(); + break; + } + case 4: { + message.availableCount = reader.int32(); + break; + } + case 5: { + message.outOfServiceCount = reader.int32(); + break; + } + case 6: { + message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectorAggregation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * Verifies a ConnectorAggregation message. + * @function verify + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectorAggregation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) + if (typeof message.maxChargeRateKw !== "number") + return "maxChargeRateKw: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.availableCount != null && message.hasOwnProperty("availableCount")) { + properties._availableCount = 1; + if (!$util.isInteger(message.availableCount)) + return "availableCount: integer expected"; + } + if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { + properties._outOfServiceCount = 1; + if (!$util.isInteger(message.outOfServiceCount)) + return "outOfServiceCount: integer expected"; + } + if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.availabilityLastUpdateTime); + if (error) + return "availabilityLastUpdateTime." + error; + } + return null; + }; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + */ + ConnectorAggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) + return object; + var message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "EV_CONNECTOR_TYPE_OTHER": + case 1: + message.type = 1; + break; + case "EV_CONNECTOR_TYPE_J1772": + case 2: + message.type = 2; + break; + case "EV_CONNECTOR_TYPE_TYPE_2": + case 3: + message.type = 3; + break; + case "EV_CONNECTOR_TYPE_CHADEMO": + case 4: + message.type = 4; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_1": + case 5: + message.type = 5; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_2": + case 6: + message.type = 6; + break; + case "EV_CONNECTOR_TYPE_TESLA": + case 7: + message.type = 7; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": + case 8: + message.type = 8; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": + case 9: + message.type = 9; + break; + } + if (object.maxChargeRateKw != null) + message.maxChargeRateKw = Number(object.maxChargeRateKw); + if (object.count != null) + message.count = object.count | 0; + if (object.availableCount != null) + message.availableCount = object.availableCount | 0; + if (object.outOfServiceCount != null) + message.outOfServiceCount = object.outOfServiceCount | 0; + if (object.availabilityLastUpdateTime != null) { + if (typeof object.availabilityLastUpdateTime !== "object") + throw TypeError(".google.maps.places.v1.EVChargeOptions.ConnectorAggregation.availabilityLastUpdateTime: object expected"); + message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.availabilityLastUpdateTime); + } + return message; + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} message ConnectorAggregation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectorAggregation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "EV_CONNECTOR_TYPE_UNSPECIFIED" : 0; + object.maxChargeRateKw = 0; + object.count = 0; + object.availabilityLastUpdateTime = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.type] === undefined ? message.type : $root.google.maps.places.v1.EVConnectorType[message.type] : message.type; + if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) + object.maxChargeRateKw = options.json && !isFinite(message.maxChargeRateKw) ? String(message.maxChargeRateKw) : message.maxChargeRateKw; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.availableCount != null && message.hasOwnProperty("availableCount")) { + object.availableCount = message.availableCount; + if (options.oneofs) + object._availableCount = "availableCount"; + } + if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { + object.outOfServiceCount = message.outOfServiceCount; + if (options.oneofs) + object._outOfServiceCount = "outOfServiceCount"; + } + if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) + object.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.availabilityLastUpdateTime, options); + return object; + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Converts this ConnectorAggregation to JSON. + * @function toJSON + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @instance + * @returns {Object.} JSON object + */ + ConnectorAggregation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * Gets the default type url for ConnectorAggregation + * @function getTypeUrl + * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectorAggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions.ConnectorAggregation"; + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + return ConnectorAggregation; + })(); - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + return EVChargeOptions; + })(); - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * EVConnectorType enum. + * @name google.maps.places.v1.EVConnectorType + * @enum {number} + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED=0 EV_CONNECTOR_TYPE_UNSPECIFIED value + * @property {number} EV_CONNECTOR_TYPE_OTHER=1 EV_CONNECTOR_TYPE_OTHER value + * @property {number} EV_CONNECTOR_TYPE_J1772=2 EV_CONNECTOR_TYPE_J1772 value + * @property {number} EV_CONNECTOR_TYPE_TYPE_2=3 EV_CONNECTOR_TYPE_TYPE_2 value + * @property {number} EV_CONNECTOR_TYPE_CHADEMO=4 EV_CONNECTOR_TYPE_CHADEMO value + * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_1=5 EV_CONNECTOR_TYPE_CCS_COMBO_1 value + * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_2=6 EV_CONNECTOR_TYPE_CCS_COMBO_2 value + * @property {number} EV_CONNECTOR_TYPE_TESLA=7 EV_CONNECTOR_TYPE_TESLA value + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T=8 EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T value + * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET=9 EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET value + */ + v1.EVConnectorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EV_CONNECTOR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EV_CONNECTOR_TYPE_OTHER"] = 1; + values[valuesById[2] = "EV_CONNECTOR_TYPE_J1772"] = 2; + values[valuesById[3] = "EV_CONNECTOR_TYPE_TYPE_2"] = 3; + values[valuesById[4] = "EV_CONNECTOR_TYPE_CHADEMO"] = 4; + values[valuesById[5] = "EV_CONNECTOR_TYPE_CCS_COMBO_1"] = 5; + values[valuesById[6] = "EV_CONNECTOR_TYPE_CCS_COMBO_2"] = 6; + values[valuesById[7] = "EV_CONNECTOR_TYPE_TESLA"] = 7; + values[valuesById[8] = "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T"] = 8; + values[valuesById[9] = "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET"] = 9; + return values; + })(); - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + v1.FuelOptions = (function() { - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * Properties of a FuelOptions. + * @memberof google.maps.places.v1 + * @interface IFuelOptions + * @property {Array.|null} [fuelPrices] FuelOptions fuelPrices + */ - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + /** + * Constructs a new FuelOptions. + * @memberof google.maps.places.v1 + * @classdesc Represents a FuelOptions. + * @implements IFuelOptions + * @constructor + * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set + */ + function FuelOptions(properties) { + this.fuelPrices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + /** + * FuelOptions fuelPrices. + * @member {Array.} fuelPrices + * @memberof google.maps.places.v1.FuelOptions + * @instance + */ + FuelOptions.prototype.fuelPrices = $util.emptyArray; - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; + /** + * Creates a new FuelOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.FuelOptions} FuelOptions instance + */ + FuelOptions.create = function create(properties) { + return new FuelOptions(properties); + }; - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fuelPrices != null && message.fuelPrices.length) + for (var i = 0; i < message.fuelPrices.length; ++i) + $root.google.maps.places.v1.FuelOptions.FuelPrice.encode(message.fuelPrices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** + * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; + /** + * Decodes a FuelOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.fuelPrices && message.fuelPrices.length)) + message.fuelPrices = []; + message.fuelPrices.push($root.google.maps.places.v1.FuelOptions.FuelPrice.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + /** + * Decodes a FuelOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a FuelOptions message. + * @function verify + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FuelOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fuelPrices != null && message.hasOwnProperty("fuelPrices")) { + if (!Array.isArray(message.fuelPrices)) + return "fuelPrices: array expected"; + for (var i = 0; i < message.fuelPrices.length; ++i) { + var error = $root.google.maps.places.v1.FuelOptions.FuelPrice.verify(message.fuelPrices[i]); + if (error) + return "fuelPrices." + error; + } + } + return null; + }; - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; + /** + * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.FuelOptions} FuelOptions + */ + FuelOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.FuelOptions) + return object; + var message = new $root.google.maps.places.v1.FuelOptions(); + if (object.fuelPrices) { + if (!Array.isArray(object.fuelPrices)) + throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: array expected"); + message.fuelPrices = []; + for (var i = 0; i < object.fuelPrices.length; ++i) { + if (typeof object.fuelPrices[i] !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: object expected"); + message.fuelPrices[i] = $root.google.maps.places.v1.FuelOptions.FuelPrice.fromObject(object.fuelPrices[i]); + } } - case 8: { - message.javaOuterClassname = reader.string(); - break; + return message; + }; + + /** + * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {google.maps.places.v1.FuelOptions} message FuelOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FuelOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fuelPrices = []; + if (message.fuelPrices && message.fuelPrices.length) { + object.fuelPrices = []; + for (var j = 0; j < message.fuelPrices.length; ++j) + object.fuelPrices[j] = $root.google.maps.places.v1.FuelOptions.FuelPrice.toObject(message.fuelPrices[j], options); } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; + return object; + }; + + /** + * Converts this FuelOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.FuelOptions + * @instance + * @returns {Object.} JSON object + */ + FuelOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FuelOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.FuelOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FuelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return typeUrlPrefix + "/google.maps.places.v1.FuelOptions"; + }; - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; + FuelOptions.FuelPrice = (function() { - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; + /** + * Properties of a FuelPrice. + * @memberof google.maps.places.v1.FuelOptions + * @interface IFuelPrice + * @property {google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null} [type] FuelPrice type + * @property {google.type.IMoney|null} [price] FuelPrice price + * @property {google.protobuf.ITimestamp|null} [updateTime] FuelPrice updateTime + */ - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; + /** + * Constructs a new FuelPrice. + * @memberof google.maps.places.v1.FuelOptions + * @classdesc Represents a FuelPrice. + * @implements IFuelPrice + * @constructor + * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set + */ + function FuelPrice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FuelPrice type. + * @member {google.maps.places.v1.FuelOptions.FuelPrice.FuelType} type + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.type = 0; - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; + /** + * FuelPrice price. + * @member {google.type.IMoney|null|undefined} price + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.price = null; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); + /** + * FuelPrice updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + */ + FuelPrice.prototype.updateTime = null; - return FileOptions; - })(); + /** + * Creates a new FuelPrice instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice instance + */ + FuelPrice.create = function create(properties) { + return new FuelPrice(properties); + }; - protobuf.MessageOptions = (function() { + /** + * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelPrice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + $root.google.type.Money.encode(message.price, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + /** + * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FuelPrice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Decodes a FuelPrice message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelPrice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.price = $root.google.type.Money.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FuelPrice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Verifies a FuelPrice message. + * @function verify + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FuelPrice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.price != null && message.hasOwnProperty("price")) { + var error = $root.google.type.Money.verify(message.price); + if (error) + return "price." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + */ + FuelPrice.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.FuelOptions.FuelPrice) + return object; + var message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FUEL_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DIESEL": + case 1: + message.type = 1; + break; + case "REGULAR_UNLEADED": + case 2: + message.type = 2; + break; + case "MIDGRADE": + case 3: + message.type = 3; + break; + case "PREMIUM": + case 4: + message.type = 4; + break; + case "SP91": + case 5: + message.type = 5; + break; + case "SP91_E10": + case 6: + message.type = 6; + break; + case "SP92": + case 7: + message.type = 7; + break; + case "SP95": + case 8: + message.type = 8; + break; + case "SP95_E10": + case 9: + message.type = 9; + break; + case "SP98": + case 10: + message.type = 10; + break; + case "SP99": + case 11: + message.type = 11; + break; + case "SP100": + case 12: + message.type = 12; + break; + case "LPG": + case 13: + message.type = 13; + break; + case "E80": + case 14: + message.type = 14; + break; + case "E85": + case 15: + message.type = 15; + break; + case "METHANE": + case 16: + message.type = 16; + break; + case "BIO_DIESEL": + case 17: + message.type = 17; + break; + case "TRUCK_DIESEL": + case 18: + message.type = 18; + break; + } + if (object.price != null) { + if (typeof object.price !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.price: object expected"); + message.price = $root.google.type.Money.fromObject(object.price); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {google.maps.places.v1.FuelOptions.FuelPrice} message FuelPrice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FuelPrice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "FUEL_TYPE_UNSPECIFIED" : 0; + object.price = null; + object.updateTime = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] === undefined ? message.type : $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] : message.type; + if (message.price != null && message.hasOwnProperty("price")) + object.price = $root.google.type.Money.toObject(message.price, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** + * Converts this FuelPrice to JSON. + * @function toJSON + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @instance + * @returns {Object.} JSON object + */ + FuelPrice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; + /** + * Gets the default type url for FuelPrice + * @function getTypeUrl + * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FuelPrice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.FuelOptions.FuelPrice"; + }; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * FuelType enum. + * @name google.maps.places.v1.FuelOptions.FuelPrice.FuelType + * @enum {number} + * @property {number} FUEL_TYPE_UNSPECIFIED=0 FUEL_TYPE_UNSPECIFIED value + * @property {number} DIESEL=1 DIESEL value + * @property {number} REGULAR_UNLEADED=2 REGULAR_UNLEADED value + * @property {number} MIDGRADE=3 MIDGRADE value + * @property {number} PREMIUM=4 PREMIUM value + * @property {number} SP91=5 SP91 value + * @property {number} SP91_E10=6 SP91_E10 value + * @property {number} SP92=7 SP92 value + * @property {number} SP95=8 SP95 value + * @property {number} SP95_E10=9 SP95_E10 value + * @property {number} SP98=10 SP98 value + * @property {number} SP99=11 SP99 value + * @property {number} SP100=12 SP100 value + * @property {number} LPG=13 LPG value + * @property {number} E80=14 E80 value + * @property {number} E85=15 E85 value + * @property {number} METHANE=16 METHANE value + * @property {number} BIO_DIESEL=17 BIO_DIESEL value + * @property {number} TRUCK_DIESEL=18 TRUCK_DIESEL value + */ + FuelPrice.FuelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FUEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIESEL"] = 1; + values[valuesById[2] = "REGULAR_UNLEADED"] = 2; + values[valuesById[3] = "MIDGRADE"] = 3; + values[valuesById[4] = "PREMIUM"] = 4; + values[valuesById[5] = "SP91"] = 5; + values[valuesById[6] = "SP91_E10"] = 6; + values[valuesById[7] = "SP92"] = 7; + values[valuesById[8] = "SP95"] = 8; + values[valuesById[9] = "SP95_E10"] = 9; + values[valuesById[10] = "SP98"] = 10; + values[valuesById[11] = "SP99"] = 11; + values[valuesById[12] = "SP100"] = 12; + values[valuesById[13] = "LPG"] = 13; + values[valuesById[14] = "E80"] = 14; + values[valuesById[15] = "E85"] = 15; + values[valuesById[16] = "METHANE"] = 16; + values[valuesById[17] = "BIO_DIESEL"] = 17; + values[valuesById[18] = "TRUCK_DIESEL"] = 18; + return values; + })(); - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; + return FuelPrice; + })(); - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; + return FuelOptions; + })(); - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; + v1.Circle = (function() { - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a Circle. + * @memberof google.maps.places.v1 + * @interface ICircle + * @property {google.type.ILatLng|null} [center] Circle center + * @property {number|null} [radius] Circle radius + */ - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Constructs a new Circle. + * @memberof google.maps.places.v1 + * @classdesc Represents a Circle. + * @implements ICircle + * @constructor + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + */ + function Circle(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - return MessageOptions; - })(); + /** + * Circle center. + * @member {google.type.ILatLng|null|undefined} center + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.center = null; - protobuf.FieldOptions = (function() { + /** + * Circle radius. + * @member {number} radius + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.radius = 0; - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ + /** + * Creates a new Circle instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + * @returns {google.maps.places.v1.Circle} Circle instance + */ + Circle.create = function create(properties) { + return new Circle(properties); + }; - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.center != null && Object.hasOwnProperty.call(message, "center")) + $root.google.type.LatLng.encode(message.center, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.radius != null && Object.hasOwnProperty.call(message, "radius")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.radius); + return writer; + }; - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Decodes a Circle message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Circle(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.center = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.radius = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Verifies a Circle message. + * @function verify + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Circle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.center != null && message.hasOwnProperty("center")) { + var error = $root.google.type.LatLng.verify(message.center); + if (error) + return "center." + error; + } + if (message.radius != null && message.hasOwnProperty("radius")) + if (typeof message.radius !== "number") + return "radius: number expected"; + return null; + }; - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; + /** + * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Circle} Circle + */ + Circle.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Circle) + return object; + var message = new $root.google.maps.places.v1.Circle(); + if (object.center != null) { + if (typeof object.center !== "object") + throw TypeError(".google.maps.places.v1.Circle.center: object expected"); + message.center = $root.google.type.LatLng.fromObject(object.center); + } + if (object.radius != null) + message.radius = Number(object.radius); + return message; + }; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.Circle} message Circle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Circle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.center = null; + object.radius = 0; + } + if (message.center != null && message.hasOwnProperty("center")) + object.center = $root.google.type.LatLng.toObject(message.center, options); + if (message.radius != null && message.hasOwnProperty("radius")) + object.radius = options.json && !isFinite(message.radius) ? String(message.radius) : message.radius; + return object; + }; - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Converts this Circle to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Circle + * @instance + * @returns {Object.} JSON object + */ + Circle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; + /** + * Gets the default type url for Circle + * @function getTypeUrl + * @memberof google.maps.places.v1.Circle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Circle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Circle"; + }; - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; + return Circle; + })(); - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; + v1.Place = (function() { - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; + /** + * Properties of a Place. + * @memberof google.maps.places.v1 + * @interface IPlace + * @property {string|null} [name] Place name + * @property {string|null} [id] Place id + * @property {google.type.ILocalizedText|null} [displayName] Place displayName + * @property {Array.|null} [types] Place types + * @property {string|null} [primaryType] Place primaryType + * @property {google.type.ILocalizedText|null} [primaryTypeDisplayName] Place primaryTypeDisplayName + * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber + * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber + * @property {string|null} [formattedAddress] Place formattedAddress + * @property {string|null} [shortFormattedAddress] Place shortFormattedAddress + * @property {Array.|null} [addressComponents] Place addressComponents + * @property {google.maps.places.v1.Place.IPlusCode|null} [plusCode] Place plusCode + * @property {google.type.ILatLng|null} [location] Place location + * @property {google.geo.type.IViewport|null} [viewport] Place viewport + * @property {number|null} [rating] Place rating + * @property {string|null} [googleMapsUri] Place googleMapsUri + * @property {string|null} [websiteUri] Place websiteUri + * @property {Array.|null} [reviews] Place reviews + * @property {google.maps.places.v1.Place.IOpeningHours|null} [regularOpeningHours] Place regularOpeningHours + * @property {number|null} [utcOffsetMinutes] Place utcOffsetMinutes + * @property {Array.|null} [photos] Place photos + * @property {string|null} [adrFormatAddress] Place adrFormatAddress + * @property {google.maps.places.v1.Place.BusinessStatus|null} [businessStatus] Place businessStatus + * @property {google.maps.places.v1.PriceLevel|null} [priceLevel] Place priceLevel + * @property {Array.|null} [attributions] Place attributions + * @property {number|null} [userRatingCount] Place userRatingCount + * @property {string|null} [iconMaskBaseUri] Place iconMaskBaseUri + * @property {string|null} [iconBackgroundColor] Place iconBackgroundColor + * @property {boolean|null} [takeout] Place takeout + * @property {boolean|null} [delivery] Place delivery + * @property {boolean|null} [dineIn] Place dineIn + * @property {boolean|null} [curbsidePickup] Place curbsidePickup + * @property {boolean|null} [reservable] Place reservable + * @property {boolean|null} [servesBreakfast] Place servesBreakfast + * @property {boolean|null} [servesLunch] Place servesLunch + * @property {boolean|null} [servesDinner] Place servesDinner + * @property {boolean|null} [servesBeer] Place servesBeer + * @property {boolean|null} [servesWine] Place servesWine + * @property {boolean|null} [servesBrunch] Place servesBrunch + * @property {boolean|null} [servesVegetarianFood] Place servesVegetarianFood + * @property {google.maps.places.v1.Place.IOpeningHours|null} [currentOpeningHours] Place currentOpeningHours + * @property {Array.|null} [currentSecondaryOpeningHours] Place currentSecondaryOpeningHours + * @property {Array.|null} [regularSecondaryOpeningHours] Place regularSecondaryOpeningHours + * @property {google.type.ILocalizedText|null} [editorialSummary] Place editorialSummary + * @property {boolean|null} [outdoorSeating] Place outdoorSeating + * @property {boolean|null} [liveMusic] Place liveMusic + * @property {boolean|null} [menuForChildren] Place menuForChildren + * @property {boolean|null} [servesCocktails] Place servesCocktails + * @property {boolean|null} [servesDessert] Place servesDessert + * @property {boolean|null} [servesCoffee] Place servesCoffee + * @property {boolean|null} [goodForChildren] Place goodForChildren + * @property {boolean|null} [allowsDogs] Place allowsDogs + * @property {boolean|null} [restroom] Place restroom + * @property {boolean|null} [goodForGroups] Place goodForGroups + * @property {boolean|null} [goodForWatchingSports] Place goodForWatchingSports + * @property {google.maps.places.v1.Place.IPaymentOptions|null} [paymentOptions] Place paymentOptions + * @property {google.maps.places.v1.Place.IParkingOptions|null} [parkingOptions] Place parkingOptions + * @property {Array.|null} [subDestinations] Place subDestinations + * @property {google.maps.places.v1.Place.IAccessibilityOptions|null} [accessibilityOptions] Place accessibilityOptions + * @property {google.maps.places.v1.IFuelOptions|null} [fuelOptions] Place fuelOptions + * @property {google.maps.places.v1.IEVChargeOptions|null} [evChargeOptions] Place evChargeOptions + * @property {google.maps.places.v1.Place.IGenerativeSummary|null} [generativeSummary] Place generativeSummary + * @property {google.maps.places.v1.Place.IAreaSummary|null} [areaSummary] Place areaSummary + */ - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; + /** + * Constructs a new Place. + * @memberof google.maps.places.v1 + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + */ + function Place(properties) { + this.types = []; + this.addressComponents = []; + this.reviews = []; + this.photos = []; + this.attributions = []; + this.currentSecondaryOpeningHours = []; + this.regularSecondaryOpeningHours = []; + this.subDestinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Place name. + * @member {string} name + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.name = ""; - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * Place id. + * @member {string} id + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.id = ""; - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * Place displayName. + * @member {google.type.ILocalizedText|null|undefined} displayName + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.displayName = null; - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; + /** + * Place types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.types = $util.emptyArray; - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; + /** + * Place primaryType. + * @member {string} primaryType + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.primaryType = ""; - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place primaryTypeDisplayName. + * @member {google.type.ILocalizedText|null|undefined} primaryTypeDisplayName + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.primaryTypeDisplayName = null; - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place nationalPhoneNumber. + * @member {string} nationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.nationalPhoneNumber = ""; - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Place internationalPhoneNumber. + * @member {string} internationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.internationalPhoneNumber = ""; - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; + /** + * Place formattedAddress. + * @member {string} formattedAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.formattedAddress = ""; - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; + /** + * Place shortFormattedAddress. + * @member {string} shortFormattedAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.shortFormattedAddress = ""; - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; + /** + * Place addressComponents. + * @member {Array.} addressComponents + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.addressComponents = $util.emptyArray; - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Place plusCode. + * @member {google.maps.places.v1.Place.IPlusCode|null|undefined} plusCode + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.plusCode = null; - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; + /** + * Place location. + * @member {google.type.ILatLng|null|undefined} location + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.location = null; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); + /** + * Place viewport. + * @member {google.geo.type.IViewport|null|undefined} viewport + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.viewport = null; - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); + /** + * Place rating. + * @member {number} rating + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.rating = 0; - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); + /** + * Place googleMapsUri. + * @member {string} googleMapsUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.googleMapsUri = ""; - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); + /** + * Place websiteUri. + * @member {string} websiteUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.websiteUri = ""; - FieldOptions.EditionDefault = (function() { + /** + * Place reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reviews = $util.emptyArray; - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ + /** + * Place regularOpeningHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} regularOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.regularOpeningHours = null; - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Place utcOffsetMinutes. + * @member {number|null|undefined} utcOffsetMinutes + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.utcOffsetMinutes = null; - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; + /** + * Place photos. + * @member {Array.} photos + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.photos = $util.emptyArray; - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; + /** + * Place adrFormatAddress. + * @member {string} adrFormatAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.adrFormatAddress = ""; - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; + /** + * Place businessStatus. + * @member {google.maps.places.v1.Place.BusinessStatus} businessStatus + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.businessStatus = 0; - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place priceLevel. + * @member {google.maps.places.v1.PriceLevel} priceLevel + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.priceLevel = 0; - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place attributions. + * @member {Array.} attributions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.attributions = $util.emptyArray; - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Place userRatingCount. + * @member {number|null|undefined} userRatingCount + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.userRatingCount = null; - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; + /** + * Place iconMaskBaseUri. + * @member {string} iconMaskBaseUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconMaskBaseUri = ""; - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; + /** + * Place iconBackgroundColor. + * @member {string} iconBackgroundColor + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconBackgroundColor = ""; - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; + /** + * Place takeout. + * @member {boolean|null|undefined} takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.takeout = null; - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Place delivery. + * @member {boolean|null|undefined} delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.delivery = null; - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; + /** + * Place dineIn. + * @member {boolean|null|undefined} dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.dineIn = null; - return EditionDefault; - })(); + /** + * Place curbsidePickup. + * @member {boolean|null|undefined} curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.curbsidePickup = null; - return FieldOptions; - })(); + /** + * Place reservable. + * @member {boolean|null|undefined} reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reservable = null; - protobuf.OneofOptions = (function() { + /** + * Place servesBreakfast. + * @member {boolean|null|undefined} servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBreakfast = null; - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * Place servesLunch. + * @member {boolean|null|undefined} servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesLunch = null; - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Place servesDinner. + * @member {boolean|null|undefined} servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesDinner = null; - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; + /** + * Place servesBeer. + * @member {boolean|null|undefined} servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBeer = null; - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Place servesWine. + * @member {boolean|null|undefined} servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesWine = null; - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; + /** + * Place servesBrunch. + * @member {boolean|null|undefined} servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBrunch = null; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Place servesVegetarianFood. + * @member {boolean|null|undefined} servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesVegetarianFood = null; - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place currentOpeningHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} currentOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentOpeningHours = null; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place currentSecondaryOpeningHours. + * @member {Array.} currentSecondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentSecondaryOpeningHours = $util.emptyArray; - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Place regularSecondaryOpeningHours. + * @member {Array.} regularSecondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.regularSecondaryOpeningHours = $util.emptyArray; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Place editorialSummary. + * @member {google.type.ILocalizedText|null|undefined} editorialSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.editorialSummary = null; - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Place outdoorSeating. + * @member {boolean|null|undefined} outdoorSeating + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.outdoorSeating = null; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Place liveMusic. + * @member {boolean|null|undefined} liveMusic + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.liveMusic = null; - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Place menuForChildren. + * @member {boolean|null|undefined} menuForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.menuForChildren = null; - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; + /** + * Place servesCocktails. + * @member {boolean|null|undefined} servesCocktails + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesCocktails = null; - return OneofOptions; - })(); + /** + * Place servesDessert. + * @member {boolean|null|undefined} servesDessert + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesDessert = null; - protobuf.EnumOptions = (function() { + /** + * Place servesCoffee. + * @member {boolean|null|undefined} servesCoffee + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesCoffee = null; - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + /** + * Place goodForChildren. + * @member {boolean|null|undefined} goodForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForChildren = null; - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Place allowsDogs. + * @member {boolean|null|undefined} allowsDogs + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.allowsDogs = null; - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * Place restroom. + * @member {boolean|null|undefined} restroom + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.restroom = null; - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + /** + * Place goodForGroups. + * @member {boolean|null|undefined} goodForGroups + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForGroups = null; - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + /** + * Place goodForWatchingSports. + * @member {boolean|null|undefined} goodForWatchingSports + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.goodForWatchingSports = null; - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; + /** + * Place paymentOptions. + * @member {google.maps.places.v1.Place.IPaymentOptions|null|undefined} paymentOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.paymentOptions = null; - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Place parkingOptions. + * @member {google.maps.places.v1.Place.IParkingOptions|null|undefined} parkingOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.parkingOptions = null; - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; + /** + * Place subDestinations. + * @member {Array.} subDestinations + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.subDestinations = $util.emptyArray; - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Place accessibilityOptions. + * @member {google.maps.places.v1.Place.IAccessibilityOptions|null|undefined} accessibilityOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.accessibilityOptions = null; - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place fuelOptions. + * @member {google.maps.places.v1.IFuelOptions|null|undefined} fuelOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.fuelOptions = null; - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place evChargeOptions. + * @member {google.maps.places.v1.IEVChargeOptions|null|undefined} evChargeOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.evChargeOptions = null; - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Place generativeSummary. + * @member {google.maps.places.v1.Place.IGenerativeSummary|null|undefined} generativeSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.generativeSummary = null; - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Place areaSummary. + * @member {google.maps.places.v1.Place.IAreaSummary|null|undefined} areaSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.areaSummary = null; - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Place _utcOffsetMinutes. + * @member {"utcOffsetMinutes"|undefined} _utcOffsetMinutes + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_utcOffsetMinutes", { + get: $util.oneOfGetter($oneOfFields = ["utcOffsetMinutes"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Place _userRatingCount. + * @member {"userRatingCount"|undefined} _userRatingCount + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_userRatingCount", { + get: $util.oneOfGetter($oneOfFields = ["userRatingCount"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; + /** + * Place _takeout. + * @member {"takeout"|undefined} _takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_takeout", { + get: $util.oneOfGetter($oneOfFields = ["takeout"]), + set: $util.oneOfSetter($oneOfFields) + }); - return EnumOptions; - })(); + /** + * Place _delivery. + * @member {"delivery"|undefined} _delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_delivery", { + get: $util.oneOfGetter($oneOfFields = ["delivery"]), + set: $util.oneOfSetter($oneOfFields) + }); - protobuf.EnumValueOptions = (function() { + /** + * Place _dineIn. + * @member {"dineIn"|undefined} _dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_dineIn", { + get: $util.oneOfGetter($oneOfFields = ["dineIn"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * Place _curbsidePickup. + * @member {"curbsidePickup"|undefined} _curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_curbsidePickup", { + get: $util.oneOfGetter($oneOfFields = ["curbsidePickup"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Place _reservable. + * @member {"reservable"|undefined} _reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_reservable", { + get: $util.oneOfGetter($oneOfFields = ["reservable"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + /** + * Place _servesBreakfast. + * @member {"servesBreakfast"|undefined} _servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBreakfast", { + get: $util.oneOfGetter($oneOfFields = ["servesBreakfast"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; + /** + * Place _servesLunch. + * @member {"servesLunch"|undefined} _servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesLunch", { + get: $util.oneOfGetter($oneOfFields = ["servesLunch"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; + /** + * Place _servesDinner. + * @member {"servesDinner"|undefined} _servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesDinner", { + get: $util.oneOfGetter($oneOfFields = ["servesDinner"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Place _servesBeer. + * @member {"servesBeer"|undefined} _servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBeer", { + get: $util.oneOfGetter($oneOfFields = ["servesBeer"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; + /** + * Place _servesWine. + * @member {"servesWine"|undefined} _servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesWine", { + get: $util.oneOfGetter($oneOfFields = ["servesWine"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Place _servesBrunch. + * @member {"servesBrunch"|undefined} _servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBrunch", { + get: $util.oneOfGetter($oneOfFields = ["servesBrunch"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place _servesVegetarianFood. + * @member {"servesVegetarianFood"|undefined} _servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesVegetarianFood", { + get: $util.oneOfGetter($oneOfFields = ["servesVegetarianFood"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place _outdoorSeating. + * @member {"outdoorSeating"|undefined} _outdoorSeating + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_outdoorSeating", { + get: $util.oneOfGetter($oneOfFields = ["outdoorSeating"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Place _liveMusic. + * @member {"liveMusic"|undefined} _liveMusic + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_liveMusic", { + get: $util.oneOfGetter($oneOfFields = ["liveMusic"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; + /** + * Place _menuForChildren. + * @member {"menuForChildren"|undefined} _menuForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_menuForChildren", { + get: $util.oneOfGetter($oneOfFields = ["menuForChildren"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Place _servesCocktails. + * @member {"servesCocktails"|undefined} _servesCocktails + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesCocktails", { + get: $util.oneOfGetter($oneOfFields = ["servesCocktails"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Place _servesDessert. + * @member {"servesDessert"|undefined} _servesDessert + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesDessert", { + get: $util.oneOfGetter($oneOfFields = ["servesDessert"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Place _servesCoffee. + * @member {"servesCoffee"|undefined} _servesCoffee + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesCoffee", { + get: $util.oneOfGetter($oneOfFields = ["servesCoffee"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * Place _goodForChildren. + * @member {"goodForChildren"|undefined} _goodForChildren + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForChildren", { + get: $util.oneOfGetter($oneOfFields = ["goodForChildren"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * Place _allowsDogs. + * @member {"allowsDogs"|undefined} _allowsDogs + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_allowsDogs", { + get: $util.oneOfGetter($oneOfFields = ["allowsDogs"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; + /** + * Place _restroom. + * @member {"restroom"|undefined} _restroom + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_restroom", { + get: $util.oneOfGetter($oneOfFields = ["restroom"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - return writer; - }; + /** + * Place _goodForGroups. + * @member {"goodForGroups"|undefined} _goodForGroups + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForGroups", { + get: $util.oneOfGetter($oneOfFields = ["goodForGroups"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Place _goodForWatchingSports. + * @member {"goodForWatchingSports"|undefined} _goodForWatchingSports + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_goodForWatchingSports", { + get: $util.oneOfGetter($oneOfFields = ["goodForWatchingSports"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Place _accessibilityOptions. + * @member {"accessibilityOptions"|undefined} _accessibilityOptions + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_accessibilityOptions", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + * @returns {google.maps.places.v1.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - return null; - }; + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); + if (message.nationalPhoneNumber != null && Object.hasOwnProperty.call(message, "nationalPhoneNumber")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.nationalPhoneNumber); + if (message.internationalPhoneNumber != null && Object.hasOwnProperty.call(message, "internationalPhoneNumber")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.internationalPhoneNumber); + if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.formattedAddress); + if (message.addressComponents != null && message.addressComponents.length) + for (var i = 0; i < message.addressComponents.length; ++i) + $root.google.maps.places.v1.Place.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode")) + $root.google.maps.places.v1.Place.PlusCode.encode(message.plusCode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.viewport != null && Object.hasOwnProperty.call(message, "viewport")) + $root.google.geo.type.Viewport.encode(message.viewport, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 14, wireType 1 =*/113).double(message.rating); + if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.googleMapsUri); + if (message.websiteUri != null && Object.hasOwnProperty.call(message, "websiteUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.websiteUri); + if (message.regularOpeningHours != null && Object.hasOwnProperty.call(message, "regularOpeningHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularOpeningHours, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.utcOffsetMinutes != null && Object.hasOwnProperty.call(message, "utcOffsetMinutes")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.utcOffsetMinutes); + if (message.adrFormatAddress != null && Object.hasOwnProperty.call(message, "adrFormatAddress")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.adrFormatAddress); + if (message.businessStatus != null && Object.hasOwnProperty.call(message, "businessStatus")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.businessStatus); + if (message.priceLevel != null && Object.hasOwnProperty.call(message, "priceLevel")) + writer.uint32(/* id 26, wireType 0 =*/208).int32(message.priceLevel); + if (message.attributions != null && message.attributions.length) + for (var i = 0; i < message.attributions.length; ++i) + $root.google.maps.places.v1.Place.Attribution.encode(message.attributions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.userRatingCount != null && Object.hasOwnProperty.call(message, "userRatingCount")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.userRatingCount); + if (message.iconMaskBaseUri != null && Object.hasOwnProperty.call(message, "iconMaskBaseUri")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.iconMaskBaseUri); + if (message.iconBackgroundColor != null && Object.hasOwnProperty.call(message, "iconBackgroundColor")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.iconBackgroundColor); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + $root.google.type.LocalizedText.encode(message.displayName, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.primaryTypeDisplayName != null && Object.hasOwnProperty.call(message, "primaryTypeDisplayName")) + $root.google.type.LocalizedText.encode(message.primaryTypeDisplayName, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.takeout); + if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.delivery); + if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.dineIn); + if (message.curbsidePickup != null && Object.hasOwnProperty.call(message, "curbsidePickup")) + writer.uint32(/* id 36, wireType 0 =*/288).bool(message.curbsidePickup); + if (message.reservable != null && Object.hasOwnProperty.call(message, "reservable")) + writer.uint32(/* id 38, wireType 0 =*/304).bool(message.reservable); + if (message.servesBreakfast != null && Object.hasOwnProperty.call(message, "servesBreakfast")) + writer.uint32(/* id 39, wireType 0 =*/312).bool(message.servesBreakfast); + if (message.servesLunch != null && Object.hasOwnProperty.call(message, "servesLunch")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.servesLunch); + if (message.servesDinner != null && Object.hasOwnProperty.call(message, "servesDinner")) + writer.uint32(/* id 41, wireType 0 =*/328).bool(message.servesDinner); + if (message.servesBeer != null && Object.hasOwnProperty.call(message, "servesBeer")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.servesBeer); + if (message.servesWine != null && Object.hasOwnProperty.call(message, "servesWine")) + writer.uint32(/* id 43, wireType 0 =*/344).bool(message.servesWine); + if (message.servesBrunch != null && Object.hasOwnProperty.call(message, "servesBrunch")) + writer.uint32(/* id 44, wireType 0 =*/352).bool(message.servesBrunch); + if (message.servesVegetarianFood != null && Object.hasOwnProperty.call(message, "servesVegetarianFood")) + writer.uint32(/* id 45, wireType 0 =*/360).bool(message.servesVegetarianFood); + if (message.currentOpeningHours != null && Object.hasOwnProperty.call(message, "currentOpeningHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentOpeningHours, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.currentSecondaryOpeningHours != null && message.currentSecondaryOpeningHours.length) + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentSecondaryOpeningHours[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.regularSecondaryOpeningHours != null && message.regularSecondaryOpeningHours.length) + for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularSecondaryOpeningHours[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.primaryType != null && Object.hasOwnProperty.call(message, "primaryType")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.primaryType); + if (message.shortFormattedAddress != null && Object.hasOwnProperty.call(message, "shortFormattedAddress")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.shortFormattedAddress); + if (message.editorialSummary != null && Object.hasOwnProperty.call(message, "editorialSummary")) + $root.google.type.LocalizedText.encode(message.editorialSummary, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.photos != null && message.photos.length) + for (var i = 0; i < message.photos.length; ++i) + $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.outdoorSeating != null && Object.hasOwnProperty.call(message, "outdoorSeating")) + writer.uint32(/* id 55, wireType 0 =*/440).bool(message.outdoorSeating); + if (message.liveMusic != null && Object.hasOwnProperty.call(message, "liveMusic")) + writer.uint32(/* id 56, wireType 0 =*/448).bool(message.liveMusic); + if (message.menuForChildren != null && Object.hasOwnProperty.call(message, "menuForChildren")) + writer.uint32(/* id 57, wireType 0 =*/456).bool(message.menuForChildren); + if (message.servesCocktails != null && Object.hasOwnProperty.call(message, "servesCocktails")) + writer.uint32(/* id 58, wireType 0 =*/464).bool(message.servesCocktails); + if (message.servesDessert != null && Object.hasOwnProperty.call(message, "servesDessert")) + writer.uint32(/* id 59, wireType 0 =*/472).bool(message.servesDessert); + if (message.servesCoffee != null && Object.hasOwnProperty.call(message, "servesCoffee")) + writer.uint32(/* id 60, wireType 0 =*/480).bool(message.servesCoffee); + if (message.goodForChildren != null && Object.hasOwnProperty.call(message, "goodForChildren")) + writer.uint32(/* id 62, wireType 0 =*/496).bool(message.goodForChildren); + if (message.allowsDogs != null && Object.hasOwnProperty.call(message, "allowsDogs")) + writer.uint32(/* id 63, wireType 0 =*/504).bool(message.allowsDogs); + if (message.restroom != null && Object.hasOwnProperty.call(message, "restroom")) + writer.uint32(/* id 64, wireType 0 =*/512).bool(message.restroom); + if (message.goodForGroups != null && Object.hasOwnProperty.call(message, "goodForGroups")) + writer.uint32(/* id 65, wireType 0 =*/520).bool(message.goodForGroups); + if (message.goodForWatchingSports != null && Object.hasOwnProperty.call(message, "goodForWatchingSports")) + writer.uint32(/* id 66, wireType 0 =*/528).bool(message.goodForWatchingSports); + if (message.paymentOptions != null && Object.hasOwnProperty.call(message, "paymentOptions")) + $root.google.maps.places.v1.Place.PaymentOptions.encode(message.paymentOptions, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.parkingOptions != null && Object.hasOwnProperty.call(message, "parkingOptions")) + $root.google.maps.places.v1.Place.ParkingOptions.encode(message.parkingOptions, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim(); + if (message.subDestinations != null && message.subDestinations.length) + for (var i = 0; i < message.subDestinations.length; ++i) + $root.google.maps.places.v1.Place.SubDestination.encode(message.subDestinations[i], writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim(); + if (message.accessibilityOptions != null && Object.hasOwnProperty.call(message, "accessibilityOptions")) + $root.google.maps.places.v1.Place.AccessibilityOptions.encode(message.accessibilityOptions, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); + if (message.fuelOptions != null && Object.hasOwnProperty.call(message, "fuelOptions")) + $root.google.maps.places.v1.FuelOptions.encode(message.fuelOptions, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); + if (message.evChargeOptions != null && Object.hasOwnProperty.call(message, "evChargeOptions")) + $root.google.maps.places.v1.EVChargeOptions.encode(message.evChargeOptions, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); + if (message.generativeSummary != null && Object.hasOwnProperty.call(message, "generativeSummary")) + $root.google.maps.places.v1.Place.GenerativeSummary.encode(message.generativeSummary, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim(); + if (message.areaSummary != null && Object.hasOwnProperty.call(message, "areaSummary")) + $root.google.maps.places.v1.Place.AreaSummary.encode(message.areaSummary, writer.uint32(/* id 81, wireType 2 =*/650).fork()).ldelim(); + return writer; + }; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; - }; + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + case 31: { + message.displayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 50: { + message.primaryType = reader.string(); + break; + } + case 32: { + message.primaryTypeDisplayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 7: { + message.nationalPhoneNumber = reader.string(); + break; + } + case 8: { + message.internationalPhoneNumber = reader.string(); + break; + } + case 9: { + message.formattedAddress = reader.string(); + break; + } + case 51: { + message.shortFormattedAddress = reader.string(); + break; + } + case 10: { + if (!(message.addressComponents && message.addressComponents.length)) + message.addressComponents = []; + message.addressComponents.push($root.google.maps.places.v1.Place.AddressComponent.decode(reader, reader.uint32())); + break; + } + case 11: { + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.decode(reader, reader.uint32()); + break; + } + case 12: { + message.location = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 13: { + message.viewport = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 14: { + message.rating = reader.double(); + break; + } + case 15: { + message.googleMapsUri = reader.string(); + break; + } + case 16: { + message.websiteUri = reader.string(); + break; + } + case 53: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); + break; + } + case 21: { + message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 22: { + message.utcOffsetMinutes = reader.int32(); + break; + } + case 54: { + if (!(message.photos && message.photos.length)) + message.photos = []; + message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); + break; + } + case 24: { + message.adrFormatAddress = reader.string(); + break; + } + case 25: { + message.businessStatus = reader.int32(); + break; + } + case 26: { + message.priceLevel = reader.int32(); + break; + } + case 27: { + if (!(message.attributions && message.attributions.length)) + message.attributions = []; + message.attributions.push($root.google.maps.places.v1.Place.Attribution.decode(reader, reader.uint32())); + break; + } + case 28: { + message.userRatingCount = reader.int32(); + break; + } + case 29: { + message.iconMaskBaseUri = reader.string(); + break; + } + case 30: { + message.iconBackgroundColor = reader.string(); + break; + } + case 33: { + message.takeout = reader.bool(); + break; + } + case 34: { + message.delivery = reader.bool(); + break; + } + case 35: { + message.dineIn = reader.bool(); + break; + } + case 36: { + message.curbsidePickup = reader.bool(); + break; + } + case 38: { + message.reservable = reader.bool(); + break; + } + case 39: { + message.servesBreakfast = reader.bool(); + break; + } + case 40: { + message.servesLunch = reader.bool(); + break; + } + case 41: { + message.servesDinner = reader.bool(); + break; + } + case 42: { + message.servesBeer = reader.bool(); + break; + } + case 43: { + message.servesWine = reader.bool(); + break; + } + case 44: { + message.servesBrunch = reader.bool(); + break; + } + case 45: { + message.servesVegetarianFood = reader.bool(); + break; + } + case 46: { + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 47: { + if (!(message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length)) + message.currentSecondaryOpeningHours = []; + message.currentSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 49: { + if (!(message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length)) + message.regularSecondaryOpeningHours = []; + message.regularSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 52: { + message.editorialSummary = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 55: { + message.outdoorSeating = reader.bool(); + break; + } + case 56: { + message.liveMusic = reader.bool(); + break; + } + case 57: { + message.menuForChildren = reader.bool(); + break; + } + case 58: { + message.servesCocktails = reader.bool(); + break; + } + case 59: { + message.servesDessert = reader.bool(); + break; + } + case 60: { + message.servesCoffee = reader.bool(); + break; + } + case 62: { + message.goodForChildren = reader.bool(); + break; + } + case 63: { + message.allowsDogs = reader.bool(); + break; + } + case 64: { + message.restroom = reader.bool(); + break; + } + case 65: { + message.goodForGroups = reader.bool(); + break; + } + case 66: { + message.goodForWatchingSports = reader.bool(); + break; + } + case 67: { + message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.decode(reader, reader.uint32()); + break; + } + case 70: { + message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.decode(reader, reader.uint32()); + break; + } + case 71: { + if (!(message.subDestinations && message.subDestinations.length)) + message.subDestinations = []; + message.subDestinations.push($root.google.maps.places.v1.Place.SubDestination.decode(reader, reader.uint32())); + break; + } + case 72: { + message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.decode(reader, reader.uint32()); + break; + } + case 78: { + message.fuelOptions = $root.google.maps.places.v1.FuelOptions.decode(reader, reader.uint32()); + break; + } + case 79: { + message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.decode(reader, reader.uint32()); + break; + } + case 80: { + message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.decode(reader, reader.uint32()); + break; + } + case 81: { + message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; + /** + * Verifies a Place message. + * @function verify + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + var error = $root.google.type.LocalizedText.verify(message.displayName); + if (error) + return "displayName." + error; } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; + if (message.primaryType != null && message.hasOwnProperty("primaryType")) + if (!$util.isString(message.primaryType)) + return "primaryType: string expected"; + if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) { + var error = $root.google.type.LocalizedText.verify(message.primaryTypeDisplayName); + if (error) + return "primaryTypeDisplayName." + error; } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + if (!$util.isString(message.nationalPhoneNumber)) + return "nationalPhoneNumber: string expected"; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + if (!$util.isString(message.internationalPhoneNumber)) + return "internationalPhoneNumber: string expected"; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + if (!$util.isString(message.formattedAddress)) + return "formattedAddress: string expected"; + if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) + if (!$util.isString(message.shortFormattedAddress)) + return "shortFormattedAddress: string expected"; + if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) { + if (!Array.isArray(message.addressComponents)) + return "addressComponents: array expected"; + for (var i = 0; i < message.addressComponents.length; ++i) { + var error = $root.google.maps.places.v1.Place.AddressComponent.verify(message.addressComponents[i]); + if (error) + return "addressComponents." + error; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; + if (message.plusCode != null && message.hasOwnProperty("plusCode")) { + var error = $root.google.maps.places.v1.Place.PlusCode.verify(message.plusCode); + if (error) + return "plusCode." + error; } - case 3: { - message.identifierValue = reader.string(); - break; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.type.LatLng.verify(message.location); + if (error) + return "location." + error; } - case 4: { - message.positiveIntValue = reader.uint64(); - break; + if (message.viewport != null && message.hasOwnProperty("viewport")) { + var error = $root.google.geo.type.Viewport.verify(message.viewport); + if (error) + return "viewport." + error; } - case 5: { - message.negativeIntValue = reader.int64(); - break; + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + if (!$util.isString(message.googleMapsUri)) + return "googleMapsUri: string expected"; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + if (!$util.isString(message.websiteUri)) + return "websiteUri: string expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } } - case 6: { - message.doubleValue = reader.double(); - break; + if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularOpeningHours); + if (error) + return "regularOpeningHours." + error; } - case 7: { - message.stringValue = reader.bytes(); - break; + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { + properties._utcOffsetMinutes = 1; + if (!$util.isInteger(message.utcOffsetMinutes)) + return "utcOffsetMinutes: integer expected"; } - case 8: { - message.aggregateValue = reader.string(); - break; + if (message.photos != null && message.hasOwnProperty("photos")) { + if (!Array.isArray(message.photos)) + return "photos: array expected"; + for (var i = 0; i < message.photos.length; ++i) { + var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); + if (error) + return "photos." + error; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + if (!$util.isString(message.adrFormatAddress)) + return "adrFormatAddress: string expected"; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + switch (message.businessStatus) { + default: + return "businessStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; } - case 2: { - message.isExtension = reader.bool(); + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + switch (message.priceLevel) { + default: + return "priceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: break; } - default: - reader.skipType(tag & 7); - break; + if (message.attributions != null && message.hasOwnProperty("attributions")) { + if (!Array.isArray(message.attributions)) + return "attributions: array expected"; + for (var i = 0; i < message.attributions.length; ++i) { + var error = $root.google.maps.places.v1.Place.Attribution.verify(message.attributions[i]); + if (error) + return "attributions." + error; + } } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { + properties._userRatingCount = 1; + if (!$util.isInteger(message.userRatingCount)) + return "userRatingCount: integer expected"; + } + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + if (!$util.isString(message.iconMaskBaseUri)) + return "iconMaskBaseUri: string expected"; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + if (!$util.isString(message.iconBackgroundColor)) + return "iconBackgroundColor: string expected"; + if (message.takeout != null && message.hasOwnProperty("takeout")) { + properties._takeout = 1; + if (typeof message.takeout !== "boolean") + return "takeout: boolean expected"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + properties._delivery = 1; + if (typeof message.delivery !== "boolean") + return "delivery: boolean expected"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + properties._dineIn = 1; + if (typeof message.dineIn !== "boolean") + return "dineIn: boolean expected"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + properties._curbsidePickup = 1; + if (typeof message.curbsidePickup !== "boolean") + return "curbsidePickup: boolean expected"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + properties._reservable = 1; + if (typeof message.reservable !== "boolean") + return "reservable: boolean expected"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + properties._servesBreakfast = 1; + if (typeof message.servesBreakfast !== "boolean") + return "servesBreakfast: boolean expected"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + properties._servesLunch = 1; + if (typeof message.servesLunch !== "boolean") + return "servesLunch: boolean expected"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + properties._servesDinner = 1; + if (typeof message.servesDinner !== "boolean") + return "servesDinner: boolean expected"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + properties._servesBeer = 1; + if (typeof message.servesBeer !== "boolean") + return "servesBeer: boolean expected"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + properties._servesWine = 1; + if (typeof message.servesWine !== "boolean") + return "servesWine: boolean expected"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + properties._servesBrunch = 1; + if (typeof message.servesBrunch !== "boolean") + return "servesBrunch: boolean expected"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + properties._servesVegetarianFood = 1; + if (typeof message.servesVegetarianFood !== "boolean") + return "servesVegetarianFood: boolean expected"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentOpeningHours); + if (error) + return "currentOpeningHours." + error; + } + if (message.currentSecondaryOpeningHours != null && message.hasOwnProperty("currentSecondaryOpeningHours")) { + if (!Array.isArray(message.currentSecondaryOpeningHours)) + return "currentSecondaryOpeningHours: array expected"; + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentSecondaryOpeningHours[i]); + if (error) + return "currentSecondaryOpeningHours." + error; + } + } + if (message.regularSecondaryOpeningHours != null && message.hasOwnProperty("regularSecondaryOpeningHours")) { + if (!Array.isArray(message.regularSecondaryOpeningHours)) + return "regularSecondaryOpeningHours: array expected"; + for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularSecondaryOpeningHours[i]); + if (error) + return "regularSecondaryOpeningHours." + error; + } + } + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) { + var error = $root.google.type.LocalizedText.verify(message.editorialSummary); + if (error) + return "editorialSummary." + error; + } + if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { + properties._outdoorSeating = 1; + if (typeof message.outdoorSeating !== "boolean") + return "outdoorSeating: boolean expected"; + } + if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { + properties._liveMusic = 1; + if (typeof message.liveMusic !== "boolean") + return "liveMusic: boolean expected"; + } + if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { + properties._menuForChildren = 1; + if (typeof message.menuForChildren !== "boolean") + return "menuForChildren: boolean expected"; + } + if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { + properties._servesCocktails = 1; + if (typeof message.servesCocktails !== "boolean") + return "servesCocktails: boolean expected"; + } + if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { + properties._servesDessert = 1; + if (typeof message.servesDessert !== "boolean") + return "servesDessert: boolean expected"; + } + if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { + properties._servesCoffee = 1; + if (typeof message.servesCoffee !== "boolean") + return "servesCoffee: boolean expected"; + } + if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { + properties._goodForChildren = 1; + if (typeof message.goodForChildren !== "boolean") + return "goodForChildren: boolean expected"; + } + if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { + properties._allowsDogs = 1; + if (typeof message.allowsDogs !== "boolean") + return "allowsDogs: boolean expected"; + } + if (message.restroom != null && message.hasOwnProperty("restroom")) { + properties._restroom = 1; + if (typeof message.restroom !== "boolean") + return "restroom: boolean expected"; + } + if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { + properties._goodForGroups = 1; + if (typeof message.goodForGroups !== "boolean") + return "goodForGroups: boolean expected"; + } + if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { + properties._goodForWatchingSports = 1; + if (typeof message.goodForWatchingSports !== "boolean") + return "goodForWatchingSports: boolean expected"; + } + if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) { + var error = $root.google.maps.places.v1.Place.PaymentOptions.verify(message.paymentOptions); + if (error) + return "paymentOptions." + error; + } + if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) { + var error = $root.google.maps.places.v1.Place.ParkingOptions.verify(message.parkingOptions); + if (error) + return "parkingOptions." + error; + } + if (message.subDestinations != null && message.hasOwnProperty("subDestinations")) { + if (!Array.isArray(message.subDestinations)) + return "subDestinations: array expected"; + for (var i = 0; i < message.subDestinations.length; ++i) { + var error = $root.google.maps.places.v1.Place.SubDestination.verify(message.subDestinations[i]); + if (error) + return "subDestinations." + error; + } + } + if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { + properties._accessibilityOptions = 1; + { + var error = $root.google.maps.places.v1.Place.AccessibilityOptions.verify(message.accessibilityOptions); + if (error) + return "accessibilityOptions." + error; + } + } + if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) { + var error = $root.google.maps.places.v1.FuelOptions.verify(message.fuelOptions); + if (error) + return "fuelOptions." + error; + } + if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) { + var error = $root.google.maps.places.v1.EVChargeOptions.verify(message.evChargeOptions); + if (error) + return "evChargeOptions." + error; + } + if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) { + var error = $root.google.maps.places.v1.Place.GenerativeSummary.verify(message.generativeSummary); + if (error) + return "generativeSummary." + error; + } + if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) { + var error = $root.google.maps.places.v1.Place.AreaSummary.verify(message.areaSummary); + if (error) + return "areaSummary." + error; + } + return null; + }; - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place) + return object; + var message = new $root.google.maps.places.v1.Place(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) { + if (typeof object.displayName !== "object") + throw TypeError(".google.maps.places.v1.Place.displayName: object expected"); + message.displayName = $root.google.type.LocalizedText.fromObject(object.displayName); } - case 2: { - message.enumType = reader.int32(); - break; + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; + if (object.primaryType != null) + message.primaryType = String(object.primaryType); + if (object.primaryTypeDisplayName != null) { + if (typeof object.primaryTypeDisplayName !== "object") + throw TypeError(".google.maps.places.v1.Place.primaryTypeDisplayName: object expected"); + message.primaryTypeDisplayName = $root.google.type.LocalizedText.fromObject(object.primaryTypeDisplayName); } - case 4: { - message.utf8Validation = reader.int32(); - break; + if (object.nationalPhoneNumber != null) + message.nationalPhoneNumber = String(object.nationalPhoneNumber); + if (object.internationalPhoneNumber != null) + message.internationalPhoneNumber = String(object.internationalPhoneNumber); + if (object.formattedAddress != null) + message.formattedAddress = String(object.formattedAddress); + if (object.shortFormattedAddress != null) + message.shortFormattedAddress = String(object.shortFormattedAddress); + if (object.addressComponents) { + if (!Array.isArray(object.addressComponents)) + throw TypeError(".google.maps.places.v1.Place.addressComponents: array expected"); + message.addressComponents = []; + for (var i = 0; i < object.addressComponents.length; ++i) { + if (typeof object.addressComponents[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.addressComponents: object expected"); + message.addressComponents[i] = $root.google.maps.places.v1.Place.AddressComponent.fromObject(object.addressComponents[i]); + } } - case 5: { - message.messageEncoding = reader.int32(); + if (object.plusCode != null) { + if (typeof object.plusCode !== "object") + throw TypeError(".google.maps.places.v1.Place.plusCode: object expected"); + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.fromObject(object.plusCode); + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.maps.places.v1.Place.location: object expected"); + message.location = $root.google.type.LatLng.fromObject(object.location); + } + if (object.viewport != null) { + if (typeof object.viewport !== "object") + throw TypeError(".google.maps.places.v1.Place.viewport: object expected"); + message.viewport = $root.google.geo.type.Viewport.fromObject(object.viewport); + } + if (object.rating != null) + message.rating = Number(object.rating); + if (object.googleMapsUri != null) + message.googleMapsUri = String(object.googleMapsUri); + if (object.websiteUri != null) + message.websiteUri = String(object.websiteUri); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.Place.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); + } + } + if (object.regularOpeningHours != null) { + if (typeof object.regularOpeningHours !== "object") + throw TypeError(".google.maps.places.v1.Place.regularOpeningHours: object expected"); + message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularOpeningHours); + } + if (object.utcOffsetMinutes != null) + message.utcOffsetMinutes = object.utcOffsetMinutes | 0; + if (object.photos) { + if (!Array.isArray(object.photos)) + throw TypeError(".google.maps.places.v1.Place.photos: array expected"); + message.photos = []; + for (var i = 0; i < object.photos.length; ++i) { + if (typeof object.photos[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.photos: object expected"); + message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); + } + } + if (object.adrFormatAddress != null) + message.adrFormatAddress = String(object.adrFormatAddress); + switch (object.businessStatus) { + default: + if (typeof object.businessStatus === "number") { + message.businessStatus = object.businessStatus; + break; + } + break; + case "BUSINESS_STATUS_UNSPECIFIED": + case 0: + message.businessStatus = 0; + break; + case "OPERATIONAL": + case 1: + message.businessStatus = 1; + break; + case "CLOSED_TEMPORARILY": + case 2: + message.businessStatus = 2; + break; + case "CLOSED_PERMANENTLY": + case 3: + message.businessStatus = 3; break; } - case 6: { - message.jsonFormat = reader.int32(); + switch (object.priceLevel) { + default: + if (typeof object.priceLevel === "number") { + message.priceLevel = object.priceLevel; + break; + } + break; + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevel = 0; + break; + case "PRICE_LEVEL_FREE": + case 1: + message.priceLevel = 1; + break; + case "PRICE_LEVEL_INEXPENSIVE": + case 2: + message.priceLevel = 2; + break; + case "PRICE_LEVEL_MODERATE": + case 3: + message.priceLevel = 3; + break; + case "PRICE_LEVEL_EXPENSIVE": + case 4: + message.priceLevel = 4; + break; + case "PRICE_LEVEL_VERY_EXPENSIVE": + case 5: + message.priceLevel = 5; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; + if (object.attributions) { + if (!Array.isArray(object.attributions)) + throw TypeError(".google.maps.places.v1.Place.attributions: array expected"); + message.attributions = []; + for (var i = 0; i < object.attributions.length; ++i) { + if (typeof object.attributions[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.attributions: object expected"); + message.attributions[i] = $root.google.maps.places.v1.Place.Attribution.fromObject(object.attributions[i]); + } } - case 4: { - message.minimumEdition = reader.int32(); - break; + if (object.userRatingCount != null) + message.userRatingCount = object.userRatingCount | 0; + if (object.iconMaskBaseUri != null) + message.iconMaskBaseUri = String(object.iconMaskBaseUri); + if (object.iconBackgroundColor != null) + message.iconBackgroundColor = String(object.iconBackgroundColor); + if (object.takeout != null) + message.takeout = Boolean(object.takeout); + if (object.delivery != null) + message.delivery = Boolean(object.delivery); + if (object.dineIn != null) + message.dineIn = Boolean(object.dineIn); + if (object.curbsidePickup != null) + message.curbsidePickup = Boolean(object.curbsidePickup); + if (object.reservable != null) + message.reservable = Boolean(object.reservable); + if (object.servesBreakfast != null) + message.servesBreakfast = Boolean(object.servesBreakfast); + if (object.servesLunch != null) + message.servesLunch = Boolean(object.servesLunch); + if (object.servesDinner != null) + message.servesDinner = Boolean(object.servesDinner); + if (object.servesBeer != null) + message.servesBeer = Boolean(object.servesBeer); + if (object.servesWine != null) + message.servesWine = Boolean(object.servesWine); + if (object.servesBrunch != null) + message.servesBrunch = Boolean(object.servesBrunch); + if (object.servesVegetarianFood != null) + message.servesVegetarianFood = Boolean(object.servesVegetarianFood); + if (object.currentOpeningHours != null) { + if (typeof object.currentOpeningHours !== "object") + throw TypeError(".google.maps.places.v1.Place.currentOpeningHours: object expected"); + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentOpeningHours); } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; + if (object.currentSecondaryOpeningHours) { + if (!Array.isArray(object.currentSecondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: array expected"); + message.currentSecondaryOpeningHours = []; + for (var i = 0; i < object.currentSecondaryOpeningHours.length; ++i) { + if (typeof object.currentSecondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: object expected"); + message.currentSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentSecondaryOpeningHours[i]); } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; + } + if (object.regularSecondaryOpeningHours) { + if (!Array.isArray(object.regularSecondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: array expected"); + message.regularSecondaryOpeningHours = []; + for (var i = 0; i < object.regularSecondaryOpeningHours.length; ++i) { + if (typeof object.regularSecondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: object expected"); + message.regularSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularSecondaryOpeningHours[i]); } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; + if (object.editorialSummary != null) { + if (typeof object.editorialSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.editorialSummary: object expected"); + message.editorialSummary = $root.google.type.LocalizedText.fromObject(object.editorialSummary); } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; + if (object.outdoorSeating != null) + message.outdoorSeating = Boolean(object.outdoorSeating); + if (object.liveMusic != null) + message.liveMusic = Boolean(object.liveMusic); + if (object.menuForChildren != null) + message.menuForChildren = Boolean(object.menuForChildren); + if (object.servesCocktails != null) + message.servesCocktails = Boolean(object.servesCocktails); + if (object.servesDessert != null) + message.servesDessert = Boolean(object.servesDessert); + if (object.servesCoffee != null) + message.servesCoffee = Boolean(object.servesCoffee); + if (object.goodForChildren != null) + message.goodForChildren = Boolean(object.goodForChildren); + if (object.allowsDogs != null) + message.allowsDogs = Boolean(object.allowsDogs); + if (object.restroom != null) + message.restroom = Boolean(object.restroom); + if (object.goodForGroups != null) + message.goodForGroups = Boolean(object.goodForGroups); + if (object.goodForWatchingSports != null) + message.goodForWatchingSports = Boolean(object.goodForWatchingSports); + if (object.paymentOptions != null) { + if (typeof object.paymentOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.paymentOptions: object expected"); + message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.fromObject(object.paymentOptions); } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; + if (object.parkingOptions != null) { + if (typeof object.parkingOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.parkingOptions: object expected"); + message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.fromObject(object.parkingOptions); + } + if (object.subDestinations) { + if (!Array.isArray(object.subDestinations)) + throw TypeError(".google.maps.places.v1.Place.subDestinations: array expected"); + message.subDestinations = []; + for (var i = 0; i < object.subDestinations.length; ++i) { + if (typeof object.subDestinations[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.subDestinations: object expected"); + message.subDestinations[i] = $root.google.maps.places.v1.Place.SubDestination.fromObject(object.subDestinations[i]); + } + } + if (object.accessibilityOptions != null) { + if (typeof object.accessibilityOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.accessibilityOptions: object expected"); + message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.fromObject(object.accessibilityOptions); + } + if (object.fuelOptions != null) { + if (typeof object.fuelOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.fuelOptions: object expected"); + message.fuelOptions = $root.google.maps.places.v1.FuelOptions.fromObject(object.fuelOptions); + } + if (object.evChargeOptions != null) { + if (typeof object.evChargeOptions !== "object") + throw TypeError(".google.maps.places.v1.Place.evChargeOptions: object expected"); + message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.fromObject(object.evChargeOptions); + } + if (object.generativeSummary != null) { + if (typeof object.generativeSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.generativeSummary: object expected"); + message.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.fromObject(object.generativeSummary); + } + if (object.areaSummary != null) { + if (typeof object.areaSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.areaSummary: object expected"); + message.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.fromObject(object.areaSummary); + } + return message; + }; - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.types = []; + object.addressComponents = []; + object.attributions = []; + object.currentSecondaryOpeningHours = []; + object.regularSecondaryOpeningHours = []; + object.reviews = []; + object.photos = []; + object.subDestinations = []; + } + if (options.defaults) { + object.name = ""; + object.id = ""; + object.nationalPhoneNumber = ""; + object.internationalPhoneNumber = ""; + object.formattedAddress = ""; + object.plusCode = null; + object.location = null; + object.viewport = null; + object.rating = 0; + object.googleMapsUri = ""; + object.websiteUri = ""; + object.regularOpeningHours = null; + object.adrFormatAddress = ""; + object.businessStatus = options.enums === String ? "BUSINESS_STATUS_UNSPECIFIED" : 0; + object.priceLevel = options.enums === String ? "PRICE_LEVEL_UNSPECIFIED" : 0; + object.iconMaskBaseUri = ""; + object.iconBackgroundColor = ""; + object.displayName = null; + object.primaryTypeDisplayName = null; + object.currentOpeningHours = null; + object.primaryType = ""; + object.shortFormattedAddress = ""; + object.editorialSummary = null; + object.paymentOptions = null; + object.parkingOptions = null; + object.fuelOptions = null; + object.evChargeOptions = null; + object.generativeSummary = null; + object.areaSummary = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + object.nationalPhoneNumber = message.nationalPhoneNumber; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + object.internationalPhoneNumber = message.internationalPhoneNumber; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + object.formattedAddress = message.formattedAddress; + if (message.addressComponents && message.addressComponents.length) { + object.addressComponents = []; + for (var j = 0; j < message.addressComponents.length; ++j) + object.addressComponents[j] = $root.google.maps.places.v1.Place.AddressComponent.toObject(message.addressComponents[j], options); + } + if (message.plusCode != null && message.hasOwnProperty("plusCode")) + object.plusCode = $root.google.maps.places.v1.Place.PlusCode.toObject(message.plusCode, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.type.LatLng.toObject(message.location, options); + if (message.viewport != null && message.hasOwnProperty("viewport")) + object.viewport = $root.google.geo.type.Viewport.toObject(message.viewport, options); + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + object.googleMapsUri = message.googleMapsUri; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + object.websiteUri = message.websiteUri; + if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) + object.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularOpeningHours, options); + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { + object.utcOffsetMinutes = message.utcOffsetMinutes; + if (options.oneofs) + object._utcOffsetMinutes = "utcOffsetMinutes"; + } + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + object.adrFormatAddress = message.adrFormatAddress; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + object.businessStatus = options.enums === String ? $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] === undefined ? message.businessStatus : $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] : message.businessStatus; + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + object.priceLevel = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevel] === undefined ? message.priceLevel : $root.google.maps.places.v1.PriceLevel[message.priceLevel] : message.priceLevel; + if (message.attributions && message.attributions.length) { + object.attributions = []; + for (var j = 0; j < message.attributions.length; ++j) + object.attributions[j] = $root.google.maps.places.v1.Place.Attribution.toObject(message.attributions[j], options); + } + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { + object.userRatingCount = message.userRatingCount; + if (options.oneofs) + object._userRatingCount = "userRatingCount"; + } + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + object.iconMaskBaseUri = message.iconMaskBaseUri; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + object.iconBackgroundColor = message.iconBackgroundColor; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = $root.google.type.LocalizedText.toObject(message.displayName, options); + if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) + object.primaryTypeDisplayName = $root.google.type.LocalizedText.toObject(message.primaryTypeDisplayName, options); + if (message.takeout != null && message.hasOwnProperty("takeout")) { + object.takeout = message.takeout; + if (options.oneofs) + object._takeout = "takeout"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + object.delivery = message.delivery; + if (options.oneofs) + object._delivery = "delivery"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + object.dineIn = message.dineIn; + if (options.oneofs) + object._dineIn = "dineIn"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + object.curbsidePickup = message.curbsidePickup; + if (options.oneofs) + object._curbsidePickup = "curbsidePickup"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + object.reservable = message.reservable; + if (options.oneofs) + object._reservable = "reservable"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + object.servesBreakfast = message.servesBreakfast; + if (options.oneofs) + object._servesBreakfast = "servesBreakfast"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + object.servesLunch = message.servesLunch; + if (options.oneofs) + object._servesLunch = "servesLunch"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + object.servesDinner = message.servesDinner; + if (options.oneofs) + object._servesDinner = "servesDinner"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + object.servesBeer = message.servesBeer; + if (options.oneofs) + object._servesBeer = "servesBeer"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + object.servesWine = message.servesWine; + if (options.oneofs) + object._servesWine = "servesWine"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + object.servesBrunch = message.servesBrunch; + if (options.oneofs) + object._servesBrunch = "servesBrunch"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + object.servesVegetarianFood = message.servesVegetarianFood; + if (options.oneofs) + object._servesVegetarianFood = "servesVegetarianFood"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) + object.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentOpeningHours, options); + if (message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length) { + object.currentSecondaryOpeningHours = []; + for (var j = 0; j < message.currentSecondaryOpeningHours.length; ++j) + object.currentSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentSecondaryOpeningHours[j], options); + } + if (message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length) { + object.regularSecondaryOpeningHours = []; + for (var j = 0; j < message.regularSecondaryOpeningHours.length; ++j) + object.regularSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularSecondaryOpeningHours[j], options); + } + if (message.primaryType != null && message.hasOwnProperty("primaryType")) + object.primaryType = message.primaryType; + if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) + object.shortFormattedAddress = message.shortFormattedAddress; + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) + object.editorialSummary = $root.google.type.LocalizedText.toObject(message.editorialSummary, options); + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); + } + if (message.photos && message.photos.length) { + object.photos = []; + for (var j = 0; j < message.photos.length; ++j) + object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); + } + if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { + object.outdoorSeating = message.outdoorSeating; + if (options.oneofs) + object._outdoorSeating = "outdoorSeating"; + } + if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { + object.liveMusic = message.liveMusic; + if (options.oneofs) + object._liveMusic = "liveMusic"; + } + if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { + object.menuForChildren = message.menuForChildren; + if (options.oneofs) + object._menuForChildren = "menuForChildren"; + } + if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { + object.servesCocktails = message.servesCocktails; + if (options.oneofs) + object._servesCocktails = "servesCocktails"; + } + if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { + object.servesDessert = message.servesDessert; + if (options.oneofs) + object._servesDessert = "servesDessert"; + } + if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { + object.servesCoffee = message.servesCoffee; + if (options.oneofs) + object._servesCoffee = "servesCoffee"; + } + if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { + object.goodForChildren = message.goodForChildren; + if (options.oneofs) + object._goodForChildren = "goodForChildren"; + } + if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { + object.allowsDogs = message.allowsDogs; + if (options.oneofs) + object._allowsDogs = "allowsDogs"; + } + if (message.restroom != null && message.hasOwnProperty("restroom")) { + object.restroom = message.restroom; + if (options.oneofs) + object._restroom = "restroom"; + } + if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { + object.goodForGroups = message.goodForGroups; + if (options.oneofs) + object._goodForGroups = "goodForGroups"; + } + if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { + object.goodForWatchingSports = message.goodForWatchingSports; + if (options.oneofs) + object._goodForWatchingSports = "goodForWatchingSports"; + } + if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) + object.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.toObject(message.paymentOptions, options); + if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) + object.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.toObject(message.parkingOptions, options); + if (message.subDestinations && message.subDestinations.length) { + object.subDestinations = []; + for (var j = 0; j < message.subDestinations.length; ++j) + object.subDestinations[j] = $root.google.maps.places.v1.Place.SubDestination.toObject(message.subDestinations[j], options); + } + if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { + object.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.toObject(message.accessibilityOptions, options); + if (options.oneofs) + object._accessibilityOptions = "accessibilityOptions"; + } + if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) + object.fuelOptions = $root.google.maps.places.v1.FuelOptions.toObject(message.fuelOptions, options); + if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) + object.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.toObject(message.evChargeOptions, options); + if (message.generativeSummary != null && message.hasOwnProperty("generativeSummary")) + object.generativeSummary = $root.google.maps.places.v1.Place.GenerativeSummary.toObject(message.generativeSummary, options); + if (message.areaSummary != null && message.hasOwnProperty("areaSummary")) + object.areaSummary = $root.google.maps.places.v1.Place.AreaSummary.toObject(message.areaSummary, options); + return object; + }; - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof google.maps.places.v1.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place"; + }; - return FeatureSetEditionDefault; - })(); + Place.AddressComponent = (function() { - return FeatureSetDefaults; - })(); + /** + * Properties of an AddressComponent. + * @memberof google.maps.places.v1.Place + * @interface IAddressComponent + * @property {string|null} [longText] AddressComponent longText + * @property {string|null} [shortText] AddressComponent shortText + * @property {Array.|null} [types] AddressComponent types + * @property {string|null} [languageCode] AddressComponent languageCode + */ - protobuf.SourceCodeInfo = (function() { + /** + * Constructs a new AddressComponent. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AddressComponent. + * @implements IAddressComponent + * @constructor + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + */ + function AddressComponent(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ + /** + * AddressComponent longText. + * @member {string} longText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.longText = ""; - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AddressComponent shortText. + * @member {string} shortText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.shortText = ""; - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; + /** + * AddressComponent types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.types = $util.emptyArray; - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; + /** + * AddressComponent languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.languageCode = ""; - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new AddressComponent instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent instance + */ + AddressComponent.create = function create(properties) { + return new AddressComponent(properties); + }; - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longText != null && Object.hasOwnProperty.call(message, "longText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.longText); + if (message.shortText != null && Object.hasOwnProperty.call(message, "shortText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortText); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.types[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + return writer; + }; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AddressComponent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.longText = reader.string(); + break; + } + case 2: { + message.shortText = reader.string(); + break; + } + case 3: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; + /** + * Verifies an AddressComponent message. + * @function verify + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressComponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.longText != null && message.hasOwnProperty("longText")) + if (!$util.isString(message.longText)) + return "longText: string expected"; + if (message.shortText != null && message.hasOwnProperty("shortText")) + if (!$util.isString(message.shortText)) + return "shortText: string expected"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; + /** + * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + */ + AddressComponent.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AddressComponent) + return object; + var message = new $root.google.maps.places.v1.Place.AddressComponent(); + if (object.longText != null) + message.longText = String(object.longText); + if (object.shortText != null) + message.shortText = String(object.shortText); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.AddressComponent.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.AddressComponent} message AddressComponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressComponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) { + object.longText = ""; + object.shortText = ""; + object.languageCode = ""; + } + if (message.longText != null && message.hasOwnProperty("longText")) + object.longText = message.longText; + if (message.shortText != null && message.hasOwnProperty("shortText")) + object.shortText = message.shortText; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; + /** + * Converts this AddressComponent to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + * @returns {Object.} JSON object + */ + AddressComponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SourceCodeInfo.Location = (function() { + /** + * Gets the default type url for AddressComponent + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AddressComponent"; + }; - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ + return AddressComponent; + })(); - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Place.PlusCode = (function() { - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * Properties of a PlusCode. + * @memberof google.maps.places.v1.Place + * @interface IPlusCode + * @property {string|null} [globalCode] PlusCode globalCode + * @property {string|null} [compoundCode] PlusCode compoundCode + */ - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * Constructs a new PlusCode. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a PlusCode. + * @implements IPlusCode + * @constructor + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + */ + function PlusCode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * PlusCode globalCode. + * @member {string} globalCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.globalCode = ""; - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * PlusCode compoundCode. + * @member {string} compoundCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.compoundCode = ""; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * Creates a new PlusCode instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode instance + */ + PlusCode.create = function create(properties) { + return new PlusCode(properties); + }; - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode); + if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode); + return writer; + }; - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PlusCode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.globalCode = reader.string(); + break; + } + case 2: { + message.compoundCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; + /** + * Verifies a PlusCode message. + * @function verify + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlusCode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + if (!$util.isString(message.globalCode)) + return "globalCode: string expected"; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + if (!$util.isString(message.compoundCode)) + return "compoundCode: string expected"; + return null; + }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; + /** + * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + */ + PlusCode.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.PlusCode) + return object; + var message = new $root.google.maps.places.v1.Place.PlusCode(); + if (object.globalCode != null) + message.globalCode = String(object.globalCode); + if (object.compoundCode != null) + message.compoundCode = String(object.compoundCode); + return message; + }; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.PlusCode} message PlusCode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlusCode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.globalCode = ""; + object.compoundCode = ""; + } + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + object.globalCode = message.globalCode; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + object.compoundCode = message.compoundCode; + return object; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this PlusCode to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + * @returns {Object.} JSON object + */ + PlusCode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; + /** + * Gets the default type url for PlusCode + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.PlusCode"; + }; - return Location; - })(); + return PlusCode; + })(); - return SourceCodeInfo; - })(); + Place.OpeningHours = (function() { - protobuf.GeneratedCodeInfo = (function() { + /** + * Properties of an OpeningHours. + * @memberof google.maps.places.v1.Place + * @interface IOpeningHours + * @property {boolean|null} [openNow] OpeningHours openNow + * @property {Array.|null} [periods] OpeningHours periods + * @property {Array.|null} [weekdayDescriptions] OpeningHours weekdayDescriptions + * @property {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null} [secondaryHoursType] OpeningHours secondaryHoursType + * @property {Array.|null} [specialDays] OpeningHours specialDays + */ - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ + /** + * Constructs a new OpeningHours. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an OpeningHours. + * @implements IOpeningHours + * @constructor + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + */ + function OpeningHours(properties) { + this.periods = []; + this.weekdayDescriptions = []; + this.specialDays = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * OpeningHours openNow. + * @member {boolean|null|undefined} openNow + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.openNow = null; - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + /** + * OpeningHours periods. + * @member {Array.} periods + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.periods = $util.emptyArray; - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ + /** + * OpeningHours weekdayDescriptions. + * @member {Array.} weekdayDescriptions + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.weekdayDescriptions = $util.emptyArray; - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * OpeningHours secondaryHoursType. + * @member {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType} secondaryHoursType + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.secondaryHoursType = 0; - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + /** + * OpeningHours specialDays. + * @member {Array.} specialDays + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.specialDays = $util.emptyArray; - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * OpeningHours _openNow. + * @member {"openNow"|undefined} _openNow + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + Object.defineProperty(OpeningHours.prototype, "_openNow", { + get: $util.oneOfGetter($oneOfFields = ["openNow"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Creates a new OpeningHours instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours instance + */ + OpeningHours.create = function create(properties) { + return new OpeningHours(properties); + }; - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.openNow); + if (message.periods != null && message.periods.length) + for (var i = 0; i < message.periods.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.Period.encode(message.periods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.weekdayDescriptions != null && message.weekdayDescriptions.length) + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.weekdayDescriptions[i]); + if (message.secondaryHoursType != null && Object.hasOwnProperty.call(message, "secondaryHoursType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secondaryHoursType); + if (message.specialDays != null && message.specialDays.length) + for (var i = 0; i < message.specialDays.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.encode(message.specialDays[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.openNow = reader.bool(); + break; + } + case 2: { + if (!(message.periods && message.periods.length)) + message.periods = []; + message.periods.push($root.google.maps.places.v1.Place.OpeningHours.Period.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.weekdayDescriptions && message.weekdayDescriptions.length)) + message.weekdayDescriptions = []; + message.weekdayDescriptions.push(reader.string()); + break; + } + case 4: { + message.secondaryHoursType = reader.int32(); + break; + } + case 5: { + if (!(message.specialDays && message.specialDays.length)) + message.specialDays = []; + message.specialDays.push($root.google.maps.places.v1.Place.OpeningHours.SpecialDay.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; + /** + * Verifies an OpeningHours message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpeningHours.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.openNow != null && message.hasOwnProperty("openNow")) { + properties._openNow = 1; + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; } - case 2: { - message.sourceFile = reader.string(); - break; + if (message.periods != null && message.hasOwnProperty("periods")) { + if (!Array.isArray(message.periods)) + return "periods: array expected"; + for (var i = 0; i < message.periods.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.verify(message.periods[i]); + if (error) + return "periods." + error; + } } - case 3: { - message.begin = reader.int32(); - break; + if (message.weekdayDescriptions != null && message.hasOwnProperty("weekdayDescriptions")) { + if (!Array.isArray(message.weekdayDescriptions)) + return "weekdayDescriptions: array expected"; + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + if (!$util.isString(message.weekdayDescriptions[i])) + return "weekdayDescriptions: string[] expected"; } - case 4: { - message.end = reader.int32(); - break; + if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) + switch (message.secondaryHoursType) { + default: + return "secondaryHoursType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.specialDays != null && message.hasOwnProperty("specialDays")) { + if (!Array.isArray(message.specialDays)) + return "specialDays: array expected"; + for (var i = 0; i < message.specialDays.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.verify(message.specialDays[i]); + if (error) + return "specialDays." + error; + } } - case 5: { - message.semantic = reader.int32(); + return null; + }; + + /** + * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + */ + OpeningHours.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours(); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.periods) { + if (!Array.isArray(object.periods)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: array expected"); + message.periods = []; + for (var i = 0; i < object.periods.length; ++i) { + if (typeof object.periods[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: object expected"); + message.periods[i] = $root.google.maps.places.v1.Place.OpeningHours.Period.fromObject(object.periods[i]); + } + } + if (object.weekdayDescriptions) { + if (!Array.isArray(object.weekdayDescriptions)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.weekdayDescriptions: array expected"); + message.weekdayDescriptions = []; + for (var i = 0; i < object.weekdayDescriptions.length; ++i) + message.weekdayDescriptions[i] = String(object.weekdayDescriptions[i]); + } + switch (object.secondaryHoursType) { + default: + if (typeof object.secondaryHoursType === "number") { + message.secondaryHoursType = object.secondaryHoursType; + break; + } + break; + case "SECONDARY_HOURS_TYPE_UNSPECIFIED": + case 0: + message.secondaryHoursType = 0; + break; + case "DRIVE_THROUGH": + case 1: + message.secondaryHoursType = 1; + break; + case "HAPPY_HOUR": + case 2: + message.secondaryHoursType = 2; + break; + case "DELIVERY": + case 3: + message.secondaryHoursType = 3; + break; + case "TAKEOUT": + case 4: + message.secondaryHoursType = 4; + break; + case "KITCHEN": + case 5: + message.secondaryHoursType = 5; + break; + case "BREAKFAST": + case 6: + message.secondaryHoursType = 6; + break; + case "LUNCH": + case 7: + message.secondaryHoursType = 7; + break; + case "DINNER": + case 8: + message.secondaryHoursType = 8; + break; + case "BRUNCH": + case 9: + message.secondaryHoursType = 9; + break; + case "PICKUP": + case 10: + message.secondaryHoursType = 10; + break; + case "ACCESS": + case 11: + message.secondaryHoursType = 11; + break; + case "SENIOR_HOURS": + case 12: + message.secondaryHoursType = 12; + break; + case "ONLINE_SERVICE_HOURS": + case 13: + message.secondaryHoursType = 13; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; + if (object.specialDays) { + if (!Array.isArray(object.specialDays)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: array expected"); + message.specialDays = []; + for (var i = 0; i < object.specialDays.length; ++i) { + if (typeof object.specialDays[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: object expected"); + message.specialDays[i] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.fromObject(object.specialDays[i]); + } + } + return message; + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.OpeningHours} message OpeningHours + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpeningHours.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.periods = []; + object.weekdayDescriptions = []; + object.specialDays = []; + } + if (options.defaults) + object.secondaryHoursType = options.enums === String ? "SECONDARY_HOURS_TYPE_UNSPECIFIED" : 0; + if (message.openNow != null && message.hasOwnProperty("openNow")) { + object.openNow = message.openNow; + if (options.oneofs) + object._openNow = "openNow"; + } + if (message.periods && message.periods.length) { + object.periods = []; + for (var j = 0; j < message.periods.length; ++j) + object.periods[j] = $root.google.maps.places.v1.Place.OpeningHours.Period.toObject(message.periods[j], options); + } + if (message.weekdayDescriptions && message.weekdayDescriptions.length) { + object.weekdayDescriptions = []; + for (var j = 0; j < message.weekdayDescriptions.length; ++j) + object.weekdayDescriptions[j] = message.weekdayDescriptions[j]; + } + if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) + object.secondaryHoursType = options.enums === String ? $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] === undefined ? message.secondaryHoursType : $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] : message.secondaryHoursType; + if (message.specialDays && message.specialDays.length) { + object.specialDays = []; + for (var j = 0; j < message.specialDays.length; ++j) + object.specialDays[j] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.toObject(message.specialDays[j], options); + } + return object; + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this OpeningHours to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + * @returns {Object.} JSON object + */ + OpeningHours.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; + /** + * Gets the default type url for OpeningHours + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpeningHours.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours"; + }; - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); + OpeningHours.Period = (function() { - return Annotation; - })(); + /** + * Properties of a Period. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface IPeriod + * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [open] Period open + * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [close] Period close + */ - return GeneratedCodeInfo; - })(); + /** + * Constructs a new Period. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents a Period. + * @implements IPeriod + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set + */ + function Period(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - protobuf.Duration = (function() { + /** + * Period open. + * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} open + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + */ + Period.prototype.open = null; - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ + /** + * Period close. + * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} close + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + */ + Period.prototype.close = null; - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new Period instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period instance + */ + Period.create = function create(properties) { + return new Period(properties); + }; - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.open != null && Object.hasOwnProperty.call(message, "open")) + $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.open, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.close != null && Object.hasOwnProperty.call(message, "close")) + $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.close, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; + /** + * Decodes a Period message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); + break; + } + case 2: { + message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a Period message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Period.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.open != null && message.hasOwnProperty("open")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.open); + if (error) + return "open." + error; + } + if (message.close != null && message.hasOwnProperty("close")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.close); + if (error) + return "close." + error; + } + return null; + }; - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period + */ + Period.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); + if (object.open != null) { + if (typeof object.open !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.open: object expected"); + message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.open); + } + if (object.close != null) { + if (typeof object.close !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.close: object expected"); + message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.close); + } + return message; + }; - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period} message Period + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Period.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.open = null; + object.close = null; + } + if (message.open != null && message.hasOwnProperty("open")) + object.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.open, options); + if (message.close != null && message.hasOwnProperty("close")) + object.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.close, options); + return object; + }; - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; + /** + * Converts this Period to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @instance + * @returns {Object.} JSON object + */ + Period.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * Gets the default type url for Period + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Period.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period"; + }; - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + Period.Point = (function() { - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a Point. + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @interface IPoint + * @property {number|null} [day] Point day + * @property {number|null} [hour] Point hour + * @property {number|null} [minute] Point minute + * @property {google.type.IDate|null} [date] Point date + * @property {boolean|null} [truncated] Point truncated + */ - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; + /** + * Constructs a new Point. + * @memberof google.maps.places.v1.Place.OpeningHours.Period + * @classdesc Represents a Point. + * @implements IPoint + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set + */ + function Point(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return Duration; - })(); + /** + * Point day. + * @member {number|null|undefined} day + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.day = null; - return protobuf; - })(); + /** + * Point hour. + * @member {number|null|undefined} hour + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.hour = null; - google.geo = (function() { + /** + * Point minute. + * @member {number|null|undefined} minute + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.minute = null; - /** - * Namespace geo. - * @memberof google - * @namespace - */ - var geo = {}; + /** + * Point date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.date = null; - geo.type = (function() { + /** + * Point truncated. + * @member {boolean} truncated + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Point.prototype.truncated = false; - /** - * Namespace type. - * @memberof google.geo - * @namespace - */ - var type = {}; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - type.Viewport = (function() { + /** + * Point _day. + * @member {"day"|undefined} _day + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_day", { + get: $util.oneOfGetter($oneOfFields = ["day"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of a Viewport. - * @memberof google.geo.type - * @interface IViewport - * @property {google.type.ILatLng|null} [low] Viewport low - * @property {google.type.ILatLng|null} [high] Viewport high - */ + /** + * Point _hour. + * @member {"hour"|undefined} _hour + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Constructs a new Viewport. - * @memberof google.geo.type - * @classdesc Represents a Viewport. - * @implements IViewport - * @constructor - * @param {google.geo.type.IViewport=} [properties] Properties to set - */ - function Viewport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Point _minute. + * @member {"minute"|undefined} _minute + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + */ + Object.defineProperty(Point.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Viewport low. - * @member {google.type.ILatLng|null|undefined} low - * @memberof google.geo.type.Viewport - * @instance - */ - Viewport.prototype.low = null; + /** + * Creates a new Point instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point instance + */ + Point.create = function create(properties) { + return new Point(properties); + }; - /** - * Viewport high. - * @member {google.type.ILatLng|null|undefined} high - * @memberof google.geo.type.Viewport - * @instance - */ - Viewport.prototype.high = null; + /** + * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hour); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minute); + if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.truncated); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * Creates a new Viewport instance using the specified properties. - * @function create - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport=} [properties] Properties to set - * @returns {google.geo.type.Viewport} Viewport instance - */ - Viewport.create = function create(properties) { - return new Viewport(properties); - }; - - /** - * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @function encode - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport} message Viewport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Viewport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.low != null && Object.hasOwnProperty.call(message, "low")) - $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.high != null && Object.hasOwnProperty.call(message, "high")) - $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.IViewport} message Viewport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Viewport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Point message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.day = reader.int32(); + break; + } + case 2: { + message.hour = reader.int32(); + break; + } + case 3: { + message.minute = reader.int32(); + break; + } + case 6: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.truncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Viewport message from the specified reader or buffer. - * @function decode - * @memberof google.geo.type.Viewport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.geo.type.Viewport} Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Viewport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.low = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 2: { - message.high = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Point.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Viewport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.geo.type.Viewport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.geo.type.Viewport} Viewport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Viewport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a Point message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Point.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.day != null && message.hasOwnProperty("day")) { + properties._day = 1; + if (!$util.isInteger(message.day)) + return "day: integer expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (!$util.isInteger(message.hour)) + return "hour: integer expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (!$util.isInteger(message.minute)) + return "minute: integer expected"; + } + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; - /** - * Verifies a Viewport message. - * @function verify - * @memberof google.geo.type.Viewport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Viewport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.low != null && message.hasOwnProperty("low")) { - var error = $root.google.type.LatLng.verify(message.low); - if (error) - return "low." + error; - } - if (message.high != null && message.hasOwnProperty("high")) { - var error = $root.google.type.LatLng.verify(message.high); - if (error) - return "high." + error; - } - return null; - }; + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point + */ + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period.Point) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); + if (object.day != null) + message.day = object.day | 0; + if (object.hour != null) + message.hour = object.hour | 0; + if (object.minute != null) + message.minute = object.minute | 0; + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.Point.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + if (object.truncated != null) + message.truncated = Boolean(object.truncated); + return message; + }; - /** - * Creates a Viewport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.geo.type.Viewport - * @static - * @param {Object.} object Plain object - * @returns {google.geo.type.Viewport} Viewport - */ - Viewport.fromObject = function fromObject(object) { - if (object instanceof $root.google.geo.type.Viewport) - return object; - var message = new $root.google.geo.type.Viewport(); - if (object.low != null) { - if (typeof object.low !== "object") - throw TypeError(".google.geo.type.Viewport.low: object expected"); - message.low = $root.google.type.LatLng.fromObject(object.low); - } - if (object.high != null) { - if (typeof object.high !== "object") - throw TypeError(".google.geo.type.Viewport.high: object expected"); - message.high = $root.google.type.LatLng.fromObject(object.high); - } - return message; - }; + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {google.maps.places.v1.Place.OpeningHours.Period.Point} message Point + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Point.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.truncated = false; + object.date = null; + } + if (message.day != null && message.hasOwnProperty("day")) { + object.day = message.day; + if (options.oneofs) + object._day = "day"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + object.truncated = message.truncated; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; - /** - * Creates a plain object from a Viewport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.geo.type.Viewport - * @static - * @param {google.geo.type.Viewport} message Viewport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Viewport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.low = null; - object.high = null; - } - if (message.low != null && message.hasOwnProperty("low")) - object.low = $root.google.type.LatLng.toObject(message.low, options); - if (message.high != null && message.hasOwnProperty("high")) - object.high = $root.google.type.LatLng.toObject(message.high, options); - return object; - }; + /** + * Converts this Point to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @instance + * @returns {Object.} JSON object + */ + Point.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Viewport to JSON. - * @function toJSON - * @memberof google.geo.type.Viewport - * @instance - * @returns {Object.} JSON object - */ - Viewport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period.Point"; + }; - /** - * Gets the default type url for Viewport - * @function getTypeUrl - * @memberof google.geo.type.Viewport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.geo.type.Viewport"; - }; + return Point; + })(); - return Viewport; - })(); + return Period; + })(); - return type; - })(); + /** + * SecondaryHoursType enum. + * @name google.maps.places.v1.Place.OpeningHours.SecondaryHoursType + * @enum {number} + * @property {number} SECONDARY_HOURS_TYPE_UNSPECIFIED=0 SECONDARY_HOURS_TYPE_UNSPECIFIED value + * @property {number} DRIVE_THROUGH=1 DRIVE_THROUGH value + * @property {number} HAPPY_HOUR=2 HAPPY_HOUR value + * @property {number} DELIVERY=3 DELIVERY value + * @property {number} TAKEOUT=4 TAKEOUT value + * @property {number} KITCHEN=5 KITCHEN value + * @property {number} BREAKFAST=6 BREAKFAST value + * @property {number} LUNCH=7 LUNCH value + * @property {number} DINNER=8 DINNER value + * @property {number} BRUNCH=9 BRUNCH value + * @property {number} PICKUP=10 PICKUP value + * @property {number} ACCESS=11 ACCESS value + * @property {number} SENIOR_HOURS=12 SENIOR_HOURS value + * @property {number} ONLINE_SERVICE_HOURS=13 ONLINE_SERVICE_HOURS value + */ + OpeningHours.SecondaryHoursType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECONDARY_HOURS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRIVE_THROUGH"] = 1; + values[valuesById[2] = "HAPPY_HOUR"] = 2; + values[valuesById[3] = "DELIVERY"] = 3; + values[valuesById[4] = "TAKEOUT"] = 4; + values[valuesById[5] = "KITCHEN"] = 5; + values[valuesById[6] = "BREAKFAST"] = 6; + values[valuesById[7] = "LUNCH"] = 7; + values[valuesById[8] = "DINNER"] = 8; + values[valuesById[9] = "BRUNCH"] = 9; + values[valuesById[10] = "PICKUP"] = 10; + values[valuesById[11] = "ACCESS"] = 11; + values[valuesById[12] = "SENIOR_HOURS"] = 12; + values[valuesById[13] = "ONLINE_SERVICE_HOURS"] = 13; + return values; + })(); - return geo; - })(); + OpeningHours.SpecialDay = (function() { - google.type = (function() { + /** + * Properties of a SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface ISpecialDay + * @property {google.type.IDate|null} [date] SpecialDay date + */ - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; + /** + * Constructs a new SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents a SpecialDay. + * @implements ISpecialDay + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + */ + function SpecialDay(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - type.LatLng = (function() { + /** + * SpecialDay date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + */ + SpecialDay.prototype.date = null; - /** - * Properties of a LatLng. - * @memberof google.type - * @interface ILatLng - * @property {number|null} [latitude] LatLng latitude - * @property {number|null} [longitude] LatLng longitude - */ + /** + * Creates a new SpecialDay instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay instance + */ + SpecialDay.create = function create(properties) { + return new SpecialDay(properties); + }; - /** - * Constructs a new LatLng. - * @memberof google.type - * @classdesc Represents a LatLng. - * @implements ILatLng - * @constructor - * @param {google.type.ILatLng=} [properties] Properties to set - */ - function LatLng(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * LatLng latitude. - * @member {number} latitude - * @memberof google.type.LatLng - * @instance - */ - LatLng.prototype.latitude = 0; + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * LatLng longitude. - * @member {number} longitude - * @memberof google.type.LatLng - * @instance - */ - LatLng.prototype.longitude = 0; + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new LatLng instance using the specified properties. - * @function create - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng=} [properties] Properties to set - * @returns {google.type.LatLng} LatLng instance - */ - LatLng.create = function create(properties) { - return new LatLng(properties); - }; + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @function encode - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng} message LatLng message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatLng.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude); - if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude); - return writer; - }; + /** + * Verifies a SpecialDay message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpecialDay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + return null; + }; - /** - * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.LatLng - * @static - * @param {google.type.ILatLng} message LatLng message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatLng.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + */ + SpecialDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.SpecialDay) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.SpecialDay.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + return message; + }; - /** - * Decodes a LatLng message from the specified reader or buffer. - * @function decode - * @memberof google.type.LatLng - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.LatLng} LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatLng.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.latitude = reader.double(); - break; - } - case 2: { - message.longitude = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.SpecialDay} message SpecialDay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpecialDay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.date = null; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; - /** - * Decodes a LatLng message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.LatLng - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.LatLng} LatLng - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatLng.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this SpecialDay to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + * @returns {Object.} JSON object + */ + SpecialDay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a LatLng message. - * @function verify - * @memberof google.type.LatLng - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatLng.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latitude != null && message.hasOwnProperty("latitude")) - if (typeof message.latitude !== "number") - return "latitude: number expected"; - if (message.longitude != null && message.hasOwnProperty("longitude")) - if (typeof message.longitude !== "number") - return "longitude: number expected"; - return null; - }; + /** + * Gets the default type url for SpecialDay + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpecialDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.SpecialDay"; + }; - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.LatLng - * @static - * @param {Object.} object Plain object - * @returns {google.type.LatLng} LatLng - */ - LatLng.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LatLng) - return object; - var message = new $root.google.type.LatLng(); - if (object.latitude != null) - message.latitude = Number(object.latitude); - if (object.longitude != null) - message.longitude = Number(object.longitude); - return message; - }; + return SpecialDay; + })(); - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.LatLng - * @static - * @param {google.type.LatLng} message LatLng - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatLng.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.latitude = 0; - object.longitude = 0; - } - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; - return object; - }; + return OpeningHours; + })(); - /** - * Converts this LatLng to JSON. - * @function toJSON - * @memberof google.type.LatLng - * @instance - * @returns {Object.} JSON object - */ - LatLng.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * BusinessStatus enum. + * @name google.maps.places.v1.Place.BusinessStatus + * @enum {number} + * @property {number} BUSINESS_STATUS_UNSPECIFIED=0 BUSINESS_STATUS_UNSPECIFIED value + * @property {number} OPERATIONAL=1 OPERATIONAL value + * @property {number} CLOSED_TEMPORARILY=2 CLOSED_TEMPORARILY value + * @property {number} CLOSED_PERMANENTLY=3 CLOSED_PERMANENTLY value + */ + Place.BusinessStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BUSINESS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPERATIONAL"] = 1; + values[valuesById[2] = "CLOSED_TEMPORARILY"] = 2; + values[valuesById[3] = "CLOSED_PERMANENTLY"] = 3; + return values; + })(); - /** - * Gets the default type url for LatLng - * @function getTypeUrl - * @memberof google.type.LatLng - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.LatLng"; - }; + Place.Attribution = (function() { - return LatLng; - })(); + /** + * Properties of an Attribution. + * @memberof google.maps.places.v1.Place + * @interface IAttribution + * @property {string|null} [provider] Attribution provider + * @property {string|null} [providerUri] Attribution providerUri + */ - type.Money = (function() { + /** + * Constructs a new Attribution. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an Attribution. + * @implements IAttribution + * @constructor + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + */ + function Attribution(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a Money. - * @memberof google.type - * @interface IMoney - * @property {string|null} [currencyCode] Money currencyCode - * @property {number|Long|null} [units] Money units - * @property {number|null} [nanos] Money nanos - */ + /** + * Attribution provider. + * @member {string} provider + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.provider = ""; - /** - * Constructs a new Money. - * @memberof google.type - * @classdesc Represents a Money. - * @implements IMoney - * @constructor - * @param {google.type.IMoney=} [properties] Properties to set - */ - function Money(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Attribution providerUri. + * @member {string} providerUri + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.providerUri = ""; - /** - * Money currencyCode. - * @member {string} currencyCode - * @memberof google.type.Money - * @instance - */ - Money.prototype.currencyCode = ""; + /** + * Creates a new Attribution instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.Attribution} Attribution instance + */ + Attribution.create = function create(properties) { + return new Attribution(properties); + }; - /** - * Money units. - * @member {number|Long} units - * @memberof google.type.Money - * @instance - */ - Money.prototype.units = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); + if (message.providerUri != null && Object.hasOwnProperty.call(message, "providerUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerUri); + return writer; + }; - /** - * Money nanos. - * @member {number} nanos - * @memberof google.type.Money - * @instance - */ - Money.prototype.nanos = 0; + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new Money instance using the specified properties. - * @function create - * @memberof google.type.Money - * @static - * @param {google.type.IMoney=} [properties] Properties to set - * @returns {google.type.Money} Money instance - */ - Money.create = function create(properties) { - return new Money(properties); - }; + /** + * Decodes an Attribution message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Attribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.string(); + break; + } + case 2: { + message.providerUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Money message. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @function encode - * @memberof google.type.Money - * @static - * @param {google.type.IMoney} message Money message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Money.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.currencyCode); - if (message.units != null && Object.hasOwnProperty.call(message, "units")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.units); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Money message, length delimited. Does not implicitly {@link google.type.Money.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Money - * @static - * @param {google.type.IMoney} message Money message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Money.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Money message from the specified reader or buffer. - * @function decode - * @memberof google.type.Money - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Money} Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Money.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Money(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.currencyCode = reader.string(); - break; - } - case 2: { - message.units = reader.int64(); - break; - } - case 3: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies an Attribution message. + * @function verify + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + if (!$util.isString(message.providerUri)) + return "providerUri: string expected"; + return null; + }; - /** - * Decodes a Money message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Money - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Money} Money - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Money.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates an Attribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.Attribution} Attribution + */ + Attribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.Attribution) + return object; + var message = new $root.google.maps.places.v1.Place.Attribution(); + if (object.provider != null) + message.provider = String(object.provider); + if (object.providerUri != null) + message.providerUri = String(object.providerUri); + return message; + }; - /** - * Verifies a Money message. - * @function verify - * @memberof google.type.Money - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Money.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - if (!$util.isString(message.currencyCode)) - return "currencyCode: string expected"; - if (message.units != null && message.hasOwnProperty("units")) - if (!$util.isInteger(message.units) && !(message.units && $util.isInteger(message.units.low) && $util.isInteger(message.units.high))) - return "units: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.Attribution} message Attribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = ""; + object.providerUri = ""; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + object.providerUri = message.providerUri; + return object; + }; - /** - * Creates a Money message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Money - * @static - * @param {Object.} object Plain object - * @returns {google.type.Money} Money - */ - Money.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Money) - return object; - var message = new $root.google.type.Money(); - if (object.currencyCode != null) - message.currencyCode = String(object.currencyCode); - if (object.units != null) - if ($util.Long) - (message.units = $util.Long.fromValue(object.units)).unsigned = false; - else if (typeof object.units === "string") - message.units = parseInt(object.units, 10); - else if (typeof object.units === "number") - message.units = object.units; - else if (typeof object.units === "object") - message.units = new $util.LongBits(object.units.low >>> 0, object.units.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * Converts this Attribution to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.Attribution + * @instance + * @returns {Object.} JSON object + */ + Attribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a Money message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Money - * @static - * @param {google.type.Money} message Money - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Money.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.currencyCode = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.units = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.units = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) - object.currencyCode = message.currencyCode; - if (message.units != null && message.hasOwnProperty("units")) - if (typeof message.units === "number") - object.units = options.longs === String ? String(message.units) : message.units; - else - object.units = options.longs === String ? $util.Long.prototype.toString.call(message.units) : options.longs === Number ? new $util.LongBits(message.units.low >>> 0, message.units.high >>> 0).toNumber() : message.units; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + /** + * Gets the default type url for Attribution + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Attribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.Attribution"; + }; - /** - * Converts this Money to JSON. - * @function toJSON - * @memberof google.type.Money - * @instance - * @returns {Object.} JSON object - */ - Money.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Attribution; + })(); - /** - * Gets the default type url for Money - * @function getTypeUrl - * @memberof google.type.Money - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Money"; - }; + Place.PaymentOptions = (function() { - return Money; - })(); + /** + * Properties of a PaymentOptions. + * @memberof google.maps.places.v1.Place + * @interface IPaymentOptions + * @property {boolean|null} [acceptsCreditCards] PaymentOptions acceptsCreditCards + * @property {boolean|null} [acceptsDebitCards] PaymentOptions acceptsDebitCards + * @property {boolean|null} [acceptsCashOnly] PaymentOptions acceptsCashOnly + * @property {boolean|null} [acceptsNfc] PaymentOptions acceptsNfc + */ - type.LocalizedText = (function() { + /** + * Constructs a new PaymentOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a PaymentOptions. + * @implements IPaymentOptions + * @constructor + * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set + */ + function PaymentOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a LocalizedText. - * @memberof google.type - * @interface ILocalizedText - * @property {string|null} [text] LocalizedText text - * @property {string|null} [languageCode] LocalizedText languageCode - */ + /** + * PaymentOptions acceptsCreditCards. + * @member {boolean|null|undefined} acceptsCreditCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsCreditCards = null; - /** - * Constructs a new LocalizedText. - * @memberof google.type - * @classdesc Represents a LocalizedText. - * @implements ILocalizedText - * @constructor - * @param {google.type.ILocalizedText=} [properties] Properties to set - */ - function LocalizedText(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * PaymentOptions acceptsDebitCards. + * @member {boolean|null|undefined} acceptsDebitCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsDebitCards = null; - /** - * LocalizedText text. - * @member {string} text - * @memberof google.type.LocalizedText - * @instance - */ - LocalizedText.prototype.text = ""; + /** + * PaymentOptions acceptsCashOnly. + * @member {boolean|null|undefined} acceptsCashOnly + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsCashOnly = null; - /** - * LocalizedText languageCode. - * @member {string} languageCode - * @memberof google.type.LocalizedText - * @instance - */ - LocalizedText.prototype.languageCode = ""; + /** + * PaymentOptions acceptsNfc. + * @member {boolean|null|undefined} acceptsNfc + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + PaymentOptions.prototype.acceptsNfc = null; - /** - * Creates a new LocalizedText instance using the specified properties. - * @function create - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText=} [properties] Properties to set - * @returns {google.type.LocalizedText} LocalizedText instance - */ - LocalizedText.create = function create(properties) { - return new LocalizedText(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @function encode - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - return writer; - }; + /** + * PaymentOptions _acceptsCreditCards. + * @member {"acceptsCreditCards"|undefined} _acceptsCreditCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsCreditCards", { + get: $util.oneOfGetter($oneOfFields = ["acceptsCreditCards"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.LocalizedText - * @static - * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * PaymentOptions _acceptsDebitCards. + * @member {"acceptsDebitCards"|undefined} _acceptsDebitCards + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsDebitCards", { + get: $util.oneOfGetter($oneOfFields = ["acceptsDebitCards"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a LocalizedText message from the specified reader or buffer. - * @function decode - * @memberof google.type.LocalizedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.LocalizedText} LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LocalizedText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * PaymentOptions _acceptsCashOnly. + * @member {"acceptsCashOnly"|undefined} _acceptsCashOnly + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsCashOnly", { + get: $util.oneOfGetter($oneOfFields = ["acceptsCashOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a LocalizedText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.LocalizedText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.LocalizedText} LocalizedText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * PaymentOptions _acceptsNfc. + * @member {"acceptsNfc"|undefined} _acceptsNfc + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + */ + Object.defineProperty(PaymentOptions.prototype, "_acceptsNfc", { + get: $util.oneOfGetter($oneOfFields = ["acceptsNfc"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Verifies a LocalizedText message. - * @function verify - * @memberof google.type.LocalizedText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalizedText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; - - /** - * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.LocalizedText - * @static - * @param {Object.} object Plain object - * @returns {google.type.LocalizedText} LocalizedText - */ - LocalizedText.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LocalizedText) - return object; - var message = new $root.google.type.LocalizedText(); - if (object.text != null) - message.text = String(object.text); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.LocalizedText - * @static - * @param {google.type.LocalizedText} message LocalizedText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalizedText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.languageCode = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + /** + * Creates a new PaymentOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions instance + */ + PaymentOptions.create = function create(properties) { + return new PaymentOptions(properties); + }; - /** - * Converts this LocalizedText to JSON. - * @function toJSON - * @memberof google.type.LocalizedText - * @instance - * @returns {Object.} JSON object - */ - LocalizedText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceptsCreditCards != null && Object.hasOwnProperty.call(message, "acceptsCreditCards")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsCreditCards); + if (message.acceptsDebitCards != null && Object.hasOwnProperty.call(message, "acceptsDebitCards")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.acceptsDebitCards); + if (message.acceptsCashOnly != null && Object.hasOwnProperty.call(message, "acceptsCashOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.acceptsCashOnly); + if (message.acceptsNfc != null && Object.hasOwnProperty.call(message, "acceptsNfc")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.acceptsNfc); + return writer; + }; - /** - * Gets the default type url for LocalizedText - * @function getTypeUrl - * @memberof google.type.LocalizedText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocalizedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.LocalizedText"; - }; + /** + * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PaymentOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return LocalizedText; - })(); + /** + * Decodes a PaymentOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PaymentOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceptsCreditCards = reader.bool(); + break; + } + case 2: { + message.acceptsDebitCards = reader.bool(); + break; + } + case 3: { + message.acceptsCashOnly = reader.bool(); + break; + } + case 4: { + message.acceptsNfc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - type.Date = (function() { + /** + * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PaymentOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ + /** + * Verifies a PaymentOptions message. + * @function verify + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PaymentOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { + properties._acceptsCreditCards = 1; + if (typeof message.acceptsCreditCards !== "boolean") + return "acceptsCreditCards: boolean expected"; + } + if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { + properties._acceptsDebitCards = 1; + if (typeof message.acceptsDebitCards !== "boolean") + return "acceptsDebitCards: boolean expected"; + } + if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { + properties._acceptsCashOnly = 1; + if (typeof message.acceptsCashOnly !== "boolean") + return "acceptsCashOnly: boolean expected"; + } + if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { + properties._acceptsNfc = 1; + if (typeof message.acceptsNfc !== "boolean") + return "acceptsNfc: boolean expected"; + } + return null; + }; - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions + */ + PaymentOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.PaymentOptions) + return object; + var message = new $root.google.maps.places.v1.Place.PaymentOptions(); + if (object.acceptsCreditCards != null) + message.acceptsCreditCards = Boolean(object.acceptsCreditCards); + if (object.acceptsDebitCards != null) + message.acceptsDebitCards = Boolean(object.acceptsDebitCards); + if (object.acceptsCashOnly != null) + message.acceptsCashOnly = Boolean(object.acceptsCashOnly); + if (object.acceptsNfc != null) + message.acceptsNfc = Boolean(object.acceptsNfc); + return message; + }; - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; + /** + * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {google.maps.places.v1.Place.PaymentOptions} message PaymentOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PaymentOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { + object.acceptsCreditCards = message.acceptsCreditCards; + if (options.oneofs) + object._acceptsCreditCards = "acceptsCreditCards"; + } + if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { + object.acceptsDebitCards = message.acceptsDebitCards; + if (options.oneofs) + object._acceptsDebitCards = "acceptsDebitCards"; + } + if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { + object.acceptsCashOnly = message.acceptsCashOnly; + if (options.oneofs) + object._acceptsCashOnly = "acceptsCashOnly"; + } + if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { + object.acceptsNfc = message.acceptsNfc; + if (options.oneofs) + object._acceptsNfc = "acceptsNfc"; + } + return object; + }; - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; + /** + * Converts this PaymentOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.PaymentOptions + * @instance + * @returns {Object.} JSON object + */ + PaymentOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; + /** + * Gets the default type url for PaymentOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.PaymentOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.PaymentOptions"; + }; - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; + return PaymentOptions; + })(); - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; + Place.ParkingOptions = (function() { - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a ParkingOptions. + * @memberof google.maps.places.v1.Place + * @interface IParkingOptions + * @property {boolean|null} [freeParkingLot] ParkingOptions freeParkingLot + * @property {boolean|null} [paidParkingLot] ParkingOptions paidParkingLot + * @property {boolean|null} [freeStreetParking] ParkingOptions freeStreetParking + * @property {boolean|null} [paidStreetParking] ParkingOptions paidStreetParking + * @property {boolean|null} [valetParking] ParkingOptions valetParking + * @property {boolean|null} [freeGarageParking] ParkingOptions freeGarageParking + * @property {boolean|null} [paidGarageParking] ParkingOptions paidGarageParking + */ - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; + /** + * Constructs a new ParkingOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a ParkingOptions. + * @implements IParkingOptions + * @constructor + * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set + */ + function ParkingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ParkingOptions freeParkingLot. + * @member {boolean|null|undefined} freeParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeParkingLot = null; - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; + /** + * ParkingOptions paidParkingLot. + * @member {boolean|null|undefined} paidParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidParkingLot = null; - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); + /** + * ParkingOptions freeStreetParking. + * @member {boolean|null|undefined} freeStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeStreetParking = null; - google.maps = (function() { + /** + * ParkingOptions paidStreetParking. + * @member {boolean|null|undefined} paidStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidStreetParking = null; - /** - * Namespace maps. - * @memberof google - * @namespace - */ - var maps = {}; + /** + * ParkingOptions valetParking. + * @member {boolean|null|undefined} valetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.valetParking = null; - maps.places = (function() { + /** + * ParkingOptions freeGarageParking. + * @member {boolean|null|undefined} freeGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.freeGarageParking = null; - /** - * Namespace places. - * @memberof google.maps - * @namespace - */ - var places = {}; + /** + * ParkingOptions paidGarageParking. + * @member {boolean|null|undefined} paidGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + ParkingOptions.prototype.paidGarageParking = null; - places.v1 = (function() { + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Namespace v1. - * @memberof google.maps.places - * @namespace - */ - var v1 = {}; + /** + * ParkingOptions _freeParkingLot. + * @member {"freeParkingLot"|undefined} _freeParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeParkingLot", { + get: $util.oneOfGetter($oneOfFields = ["freeParkingLot"]), + set: $util.oneOfSetter($oneOfFields) + }); - v1.AuthorAttribution = (function() { + /** + * ParkingOptions _paidParkingLot. + * @member {"paidParkingLot"|undefined} _paidParkingLot + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidParkingLot", { + get: $util.oneOfGetter($oneOfFields = ["paidParkingLot"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of an AuthorAttribution. - * @memberof google.maps.places.v1 - * @interface IAuthorAttribution - * @property {string|null} [displayName] AuthorAttribution displayName - * @property {string|null} [uri] AuthorAttribution uri - * @property {string|null} [photoUri] AuthorAttribution photoUri - */ + /** + * ParkingOptions _freeStreetParking. + * @member {"freeStreetParking"|undefined} _freeStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeStreetParking", { + get: $util.oneOfGetter($oneOfFields = ["freeStreetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Constructs a new AuthorAttribution. - * @memberof google.maps.places.v1 - * @classdesc Represents an AuthorAttribution. - * @implements IAuthorAttribution - * @constructor - * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set - */ - function AuthorAttribution(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ParkingOptions _paidStreetParking. + * @member {"paidStreetParking"|undefined} _paidStreetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidStreetParking", { + get: $util.oneOfGetter($oneOfFields = ["paidStreetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * AuthorAttribution displayName. - * @member {string} displayName - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.displayName = ""; + /** + * ParkingOptions _valetParking. + * @member {"valetParking"|undefined} _valetParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_valetParking", { + get: $util.oneOfGetter($oneOfFields = ["valetParking"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * AuthorAttribution uri. - * @member {string} uri - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.uri = ""; + /** + * ParkingOptions _freeGarageParking. + * @member {"freeGarageParking"|undefined} _freeGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_freeGarageParking", { + get: $util.oneOfGetter($oneOfFields = ["freeGarageParking"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * AuthorAttribution photoUri. - * @member {string} photoUri - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - */ - AuthorAttribution.prototype.photoUri = ""; + /** + * ParkingOptions _paidGarageParking. + * @member {"paidGarageParking"|undefined} _paidGarageParking + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + */ + Object.defineProperty(ParkingOptions.prototype, "_paidGarageParking", { + get: $util.oneOfGetter($oneOfFields = ["paidGarageParking"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new AuthorAttribution instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution=} [properties] Properties to set - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution instance - */ - AuthorAttribution.create = function create(properties) { - return new AuthorAttribution(properties); - }; + /** + * Creates a new ParkingOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions instance + */ + ParkingOptions.create = function create(properties) { + return new ParkingOptions(properties); + }; - /** - * Encodes the specified AuthorAttribution message. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthorAttribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.photoUri); - return writer; - }; + /** + * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParkingOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.freeParkingLot != null && Object.hasOwnProperty.call(message, "freeParkingLot")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.freeParkingLot); + if (message.paidParkingLot != null && Object.hasOwnProperty.call(message, "paidParkingLot")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paidParkingLot); + if (message.freeStreetParking != null && Object.hasOwnProperty.call(message, "freeStreetParking")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.freeStreetParking); + if (message.paidStreetParking != null && Object.hasOwnProperty.call(message, "paidStreetParking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.paidStreetParking); + if (message.valetParking != null && Object.hasOwnProperty.call(message, "valetParking")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.valetParking); + if (message.freeGarageParking != null && Object.hasOwnProperty.call(message, "freeGarageParking")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.freeGarageParking); + if (message.paidGarageParking != null && Object.hasOwnProperty.call(message, "paidGarageParking")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.paidGarageParking); + return writer; + }; - /** - * Encodes the specified AuthorAttribution message, length delimited. Does not implicitly {@link google.maps.places.v1.AuthorAttribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.IAuthorAttribution} message AuthorAttribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthorAttribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParkingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an AuthorAttribution message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthorAttribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AuthorAttribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.photoUri = reader.string(); + /** + * Decodes a ParkingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParkingOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ParkingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.freeParkingLot = reader.bool(); + break; + } + case 2: { + message.paidParkingLot = reader.bool(); + break; + } + case 3: { + message.freeStreetParking = reader.bool(); + break; + } + case 4: { + message.paidStreetParking = reader.bool(); + break; + } + case 5: { + message.valetParking = reader.bool(); + break; + } + case 6: { + message.freeGarageParking = reader.bool(); + break; + } + case 7: { + message.paidGarageParking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes an AuthorAttribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthorAttribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuthorAttribution message. - * @function verify - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuthorAttribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - if (!$util.isString(message.photoUri)) - return "photoUri: string expected"; - return null; - }; + return message; + }; - /** - * Creates an AuthorAttribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AuthorAttribution} AuthorAttribution - */ - AuthorAttribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AuthorAttribution) - return object; - var message = new $root.google.maps.places.v1.AuthorAttribution(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.photoUri != null) - message.photoUri = String(object.photoUri); - return message; - }; + /** + * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParkingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an AuthorAttribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {google.maps.places.v1.AuthorAttribution} message AuthorAttribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuthorAttribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.photoUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - object.photoUri = message.photoUri; - return object; - }; - - /** - * Converts this AuthorAttribution to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AuthorAttribution - * @instance - * @returns {Object.} JSON object - */ - AuthorAttribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuthorAttribution - * @function getTypeUrl - * @memberof google.maps.places.v1.AuthorAttribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuthorAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AuthorAttribution"; - }; - - return AuthorAttribution; - })(); - - v1.EVChargeOptions = (function() { - - /** - * Properties of a EVChargeOptions. - * @memberof google.maps.places.v1 - * @interface IEVChargeOptions - * @property {number|null} [connectorCount] EVChargeOptions connectorCount - * @property {Array.|null} [connectorAggregation] EVChargeOptions connectorAggregation - */ - - /** - * Constructs a new EVChargeOptions. - * @memberof google.maps.places.v1 - * @classdesc Represents a EVChargeOptions. - * @implements IEVChargeOptions - * @constructor - * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set - */ - function EVChargeOptions(properties) { - this.connectorAggregation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EVChargeOptions connectorCount. - * @member {number} connectorCount - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - */ - EVChargeOptions.prototype.connectorCount = 0; - - /** - * EVChargeOptions connectorAggregation. - * @member {Array.} connectorAggregation - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - */ - EVChargeOptions.prototype.connectorAggregation = $util.emptyArray; - - /** - * Creates a new EVChargeOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions instance - */ - EVChargeOptions.create = function create(properties) { - return new EVChargeOptions(properties); - }; - - /** - * Encodes the specified EVChargeOptions message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVChargeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectorCount != null && Object.hasOwnProperty.call(message, "connectorCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectorCount); - if (message.connectorAggregation != null && message.connectorAggregation.length) - for (var i = 0; i < message.connectorAggregation.length; ++i) - $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.encode(message.connectorAggregation[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EVChargeOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.IEVChargeOptions} message EVChargeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVChargeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a EVChargeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVChargeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.connectorCount = reader.int32(); - break; - } - case 2: { - if (!(message.connectorAggregation && message.connectorAggregation.length)) - message.connectorAggregation = []; - message.connectorAggregation.push($root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Verifies a ParkingOptions message. + * @function verify + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParkingOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { + properties._freeParkingLot = 1; + if (typeof message.freeParkingLot !== "boolean") + return "freeParkingLot: boolean expected"; } - } - return message; - }; + if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { + properties._paidParkingLot = 1; + if (typeof message.paidParkingLot !== "boolean") + return "paidParkingLot: boolean expected"; + } + if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { + properties._freeStreetParking = 1; + if (typeof message.freeStreetParking !== "boolean") + return "freeStreetParking: boolean expected"; + } + if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { + properties._paidStreetParking = 1; + if (typeof message.paidStreetParking !== "boolean") + return "paidStreetParking: boolean expected"; + } + if (message.valetParking != null && message.hasOwnProperty("valetParking")) { + properties._valetParking = 1; + if (typeof message.valetParking !== "boolean") + return "valetParking: boolean expected"; + } + if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { + properties._freeGarageParking = 1; + if (typeof message.freeGarageParking !== "boolean") + return "freeGarageParking: boolean expected"; + } + if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { + properties._paidGarageParking = 1; + if (typeof message.paidGarageParking !== "boolean") + return "paidGarageParking: boolean expected"; + } + return null; + }; - /** - * Decodes a EVChargeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVChargeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions + */ + ParkingOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.ParkingOptions) + return object; + var message = new $root.google.maps.places.v1.Place.ParkingOptions(); + if (object.freeParkingLot != null) + message.freeParkingLot = Boolean(object.freeParkingLot); + if (object.paidParkingLot != null) + message.paidParkingLot = Boolean(object.paidParkingLot); + if (object.freeStreetParking != null) + message.freeStreetParking = Boolean(object.freeStreetParking); + if (object.paidStreetParking != null) + message.paidStreetParking = Boolean(object.paidStreetParking); + if (object.valetParking != null) + message.valetParking = Boolean(object.valetParking); + if (object.freeGarageParking != null) + message.freeGarageParking = Boolean(object.freeGarageParking); + if (object.paidGarageParking != null) + message.paidGarageParking = Boolean(object.paidGarageParking); + return message; + }; - /** - * Verifies a EVChargeOptions message. - * @function verify - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EVChargeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) - if (!$util.isInteger(message.connectorCount)) - return "connectorCount: integer expected"; - if (message.connectorAggregation != null && message.hasOwnProperty("connectorAggregation")) { - if (!Array.isArray(message.connectorAggregation)) - return "connectorAggregation: array expected"; - for (var i = 0; i < message.connectorAggregation.length; ++i) { - var error = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify(message.connectorAggregation[i]); - if (error) - return "connectorAggregation." + error; + /** + * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {google.maps.places.v1.Place.ParkingOptions} message ParkingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParkingOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { + object.freeParkingLot = message.freeParkingLot; + if (options.oneofs) + object._freeParkingLot = "freeParkingLot"; } - } - return null; - }; - - /** - * Creates a EVChargeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.EVChargeOptions} EVChargeOptions - */ - EVChargeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.EVChargeOptions) - return object; - var message = new $root.google.maps.places.v1.EVChargeOptions(); - if (object.connectorCount != null) - message.connectorCount = object.connectorCount | 0; - if (object.connectorAggregation) { - if (!Array.isArray(object.connectorAggregation)) - throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: array expected"); - message.connectorAggregation = []; - for (var i = 0; i < object.connectorAggregation.length; ++i) { - if (typeof object.connectorAggregation[i] !== "object") - throw TypeError(".google.maps.places.v1.EVChargeOptions.connectorAggregation: object expected"); - message.connectorAggregation[i] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.fromObject(object.connectorAggregation[i]); + if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { + object.paidParkingLot = message.paidParkingLot; + if (options.oneofs) + object._paidParkingLot = "paidParkingLot"; } - } - return message; - }; + if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { + object.freeStreetParking = message.freeStreetParking; + if (options.oneofs) + object._freeStreetParking = "freeStreetParking"; + } + if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { + object.paidStreetParking = message.paidStreetParking; + if (options.oneofs) + object._paidStreetParking = "paidStreetParking"; + } + if (message.valetParking != null && message.hasOwnProperty("valetParking")) { + object.valetParking = message.valetParking; + if (options.oneofs) + object._valetParking = "valetParking"; + } + if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { + object.freeGarageParking = message.freeGarageParking; + if (options.oneofs) + object._freeGarageParking = "freeGarageParking"; + } + if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { + object.paidGarageParking = message.paidGarageParking; + if (options.oneofs) + object._paidGarageParking = "paidGarageParking"; + } + return object; + }; - /** - * Creates a plain object from a EVChargeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {google.maps.places.v1.EVChargeOptions} message EVChargeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EVChargeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connectorAggregation = []; - if (options.defaults) - object.connectorCount = 0; - if (message.connectorCount != null && message.hasOwnProperty("connectorCount")) - object.connectorCount = message.connectorCount; - if (message.connectorAggregation && message.connectorAggregation.length) { - object.connectorAggregation = []; - for (var j = 0; j < message.connectorAggregation.length; ++j) - object.connectorAggregation[j] = $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation.toObject(message.connectorAggregation[j], options); - } - return object; - }; + /** + * Converts this ParkingOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.ParkingOptions + * @instance + * @returns {Object.} JSON object + */ + ParkingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this EVChargeOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.EVChargeOptions - * @instance - * @returns {Object.} JSON object - */ - EVChargeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ParkingOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.ParkingOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParkingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.ParkingOptions"; + }; - /** - * Gets the default type url for EVChargeOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.EVChargeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EVChargeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions"; - }; + return ParkingOptions; + })(); - EVChargeOptions.ConnectorAggregation = (function() { + Place.SubDestination = (function() { /** - * Properties of a ConnectorAggregation. - * @memberof google.maps.places.v1.EVChargeOptions - * @interface IConnectorAggregation - * @property {google.maps.places.v1.EVConnectorType|null} [type] ConnectorAggregation type - * @property {number|null} [maxChargeRateKw] ConnectorAggregation maxChargeRateKw - * @property {number|null} [count] ConnectorAggregation count - * @property {number|null} [availableCount] ConnectorAggregation availableCount - * @property {number|null} [outOfServiceCount] ConnectorAggregation outOfServiceCount - * @property {google.protobuf.ITimestamp|null} [availabilityLastUpdateTime] ConnectorAggregation availabilityLastUpdateTime + * Properties of a SubDestination. + * @memberof google.maps.places.v1.Place + * @interface ISubDestination + * @property {string|null} [name] SubDestination name + * @property {string|null} [id] SubDestination id */ /** - * Constructs a new ConnectorAggregation. - * @memberof google.maps.places.v1.EVChargeOptions - * @classdesc Represents a ConnectorAggregation. - * @implements IConnectorAggregation + * Constructs a new SubDestination. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a SubDestination. + * @implements ISubDestination * @constructor - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set + * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set */ - function ConnectorAggregation(properties) { + function SubDestination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14314,170 +11026,393 @@ } /** - * ConnectorAggregation type. - * @member {google.maps.places.v1.EVConnectorType} type - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance - */ - ConnectorAggregation.prototype.type = 0; - - /** - * ConnectorAggregation maxChargeRateKw. - * @member {number} maxChargeRateKw - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * SubDestination name. + * @member {string} name + * @memberof google.maps.places.v1.Place.SubDestination * @instance */ - ConnectorAggregation.prototype.maxChargeRateKw = 0; + SubDestination.prototype.name = ""; /** - * ConnectorAggregation count. - * @member {number} count - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * SubDestination id. + * @member {string} id + * @memberof google.maps.places.v1.Place.SubDestination * @instance */ - ConnectorAggregation.prototype.count = 0; + SubDestination.prototype.id = ""; /** - * ConnectorAggregation availableCount. - * @member {number|null|undefined} availableCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance + * Creates a new SubDestination instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination instance */ - ConnectorAggregation.prototype.availableCount = null; + SubDestination.create = function create(properties) { + return new SubDestination(properties); + }; /** - * ConnectorAggregation outOfServiceCount. - * @member {number|null|undefined} outOfServiceCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation - * @instance + * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ConnectorAggregation.prototype.outOfServiceCount = null; + SubDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; /** - * ConnectorAggregation availabilityLastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} availabilityLastUpdateTime - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubDestination message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.SubDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubDestination message. + * @function verify + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.SubDestination} SubDestination + */ + SubDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.SubDestination) + return object; + var message = new $root.google.maps.places.v1.Place.SubDestination(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a SubDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {google.maps.places.v1.Place.SubDestination} message SubDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.id = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this SubDestination to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.SubDestination * @instance + * @returns {Object.} JSON object */ - ConnectorAggregation.prototype.availabilityLastUpdateTime = null; + SubDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SubDestination + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.SubDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.SubDestination"; + }; + + return SubDestination; + })(); + + Place.AccessibilityOptions = (function() { + + /** + * Properties of an AccessibilityOptions. + * @memberof google.maps.places.v1.Place + * @interface IAccessibilityOptions + * @property {boolean|null} [wheelchairAccessibleParking] AccessibilityOptions wheelchairAccessibleParking + * @property {boolean|null} [wheelchairAccessibleEntrance] AccessibilityOptions wheelchairAccessibleEntrance + * @property {boolean|null} [wheelchairAccessibleRestroom] AccessibilityOptions wheelchairAccessibleRestroom + * @property {boolean|null} [wheelchairAccessibleSeating] AccessibilityOptions wheelchairAccessibleSeating + */ + + /** + * Constructs a new AccessibilityOptions. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AccessibilityOptions. + * @implements IAccessibilityOptions + * @constructor + * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set + */ + function AccessibilityOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessibilityOptions wheelchairAccessibleParking. + * @member {boolean|null|undefined} wheelchairAccessibleParking + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleParking = null; + + /** + * AccessibilityOptions wheelchairAccessibleEntrance. + * @member {boolean|null|undefined} wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleEntrance = null; + + /** + * AccessibilityOptions wheelchairAccessibleRestroom. + * @member {boolean|null|undefined} wheelchairAccessibleRestroom + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleRestroom = null; + + /** + * AccessibilityOptions wheelchairAccessibleSeating. + * @member {boolean|null|undefined} wheelchairAccessibleSeating + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + AccessibilityOptions.prototype.wheelchairAccessibleSeating = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ConnectorAggregation _availableCount. - * @member {"availableCount"|undefined} _availableCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * AccessibilityOptions _wheelchairAccessibleParking. + * @member {"wheelchairAccessibleParking"|undefined} _wheelchairAccessibleParking + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @instance */ - Object.defineProperty(ConnectorAggregation.prototype, "_availableCount", { - get: $util.oneOfGetter($oneOfFields = ["availableCount"]), + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleParking", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleParking"]), set: $util.oneOfSetter($oneOfFields) }); /** - * ConnectorAggregation _outOfServiceCount. - * @member {"outOfServiceCount"|undefined} _outOfServiceCount - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * AccessibilityOptions _wheelchairAccessibleEntrance. + * @member {"wheelchairAccessibleEntrance"|undefined} _wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @instance */ - Object.defineProperty(ConnectorAggregation.prototype, "_outOfServiceCount", { - get: $util.oneOfGetter($oneOfFields = ["outOfServiceCount"]), + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleEntrance", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleEntrance"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ConnectorAggregation instance using the specified properties. + * AccessibilityOptions _wheelchairAccessibleRestroom. + * @member {"wheelchairAccessibleRestroom"|undefined} _wheelchairAccessibleRestroom + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleRestroom", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleRestroom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessibilityOptions _wheelchairAccessibleSeating. + * @member {"wheelchairAccessibleSeating"|undefined} _wheelchairAccessibleSeating + * @memberof google.maps.places.v1.Place.AccessibilityOptions + * @instance + */ + Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleSeating", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleSeating"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessibilityOptions instance using the specified properties. * @function create - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation=} [properties] Properties to set - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation instance + * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions instance */ - ConnectorAggregation.create = function create(properties) { - return new ConnectorAggregation(properties); + AccessibilityOptions.create = function create(properties) { + return new AccessibilityOptions(properties); }; /** - * Encodes the specified ConnectorAggregation message. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. * @function encode - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectorAggregation.encode = function encode(message, writer) { + AccessibilityOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.maxChargeRateKw != null && Object.hasOwnProperty.call(message, "maxChargeRateKw")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.maxChargeRateKw); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.count); - if (message.availableCount != null && Object.hasOwnProperty.call(message, "availableCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.availableCount); - if (message.outOfServiceCount != null && Object.hasOwnProperty.call(message, "outOfServiceCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.outOfServiceCount); - if (message.availabilityLastUpdateTime != null && Object.hasOwnProperty.call(message, "availabilityLastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.availabilityLastUpdateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.wheelchairAccessibleParking != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleParking")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.wheelchairAccessibleParking); + if (message.wheelchairAccessibleEntrance != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleEntrance")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.wheelchairAccessibleEntrance); + if (message.wheelchairAccessibleRestroom != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleRestroom")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.wheelchairAccessibleRestroom); + if (message.wheelchairAccessibleSeating != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleSeating")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.wheelchairAccessibleSeating); return writer; }; /** - * Encodes the specified ConnectorAggregation message, length delimited. Does not implicitly {@link google.maps.places.v1.EVChargeOptions.ConnectorAggregation.verify|verify} messages. + * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static - * @param {google.maps.places.v1.EVChargeOptions.IConnectorAggregation} message ConnectorAggregation message or plain object to encode + * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectorAggregation.encodeDelimited = function encodeDelimited(message, writer) { + AccessibilityOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConnectorAggregation message from the specified reader or buffer. + * Decodes an AccessibilityOptions message from the specified reader or buffer. * @function decode - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectorAggregation.decode = function decode(reader, length) { + AccessibilityOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.wheelchairAccessibleParking = reader.bool(); break; } case 2: { - message.maxChargeRateKw = reader.double(); + message.wheelchairAccessibleEntrance = reader.bool(); break; } case 3: { - message.count = reader.int32(); + message.wheelchairAccessibleRestroom = reader.bool(); break; } case 4: { - message.availableCount = reader.int32(); - break; - } - case 5: { - message.outOfServiceCount = reader.int32(); - break; - } - case 6: { - message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.wheelchairAccessibleSeating = reader.bool(); break; } default: @@ -14489,492 +11424,164 @@ }; /** - * Decodes a ConnectorAggregation message from the specified reader or buffer, length delimited. + * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectorAggregation.decodeDelimited = function decodeDelimited(reader) { + AccessibilityOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConnectorAggregation message. + * Verifies an AccessibilityOptions message. * @function verify - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConnectorAggregation.verify = function verify(message) { + AccessibilityOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) - if (typeof message.maxChargeRateKw !== "number") - return "maxChargeRateKw: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - if (message.availableCount != null && message.hasOwnProperty("availableCount")) { - properties._availableCount = 1; - if (!$util.isInteger(message.availableCount)) - return "availableCount: integer expected"; + if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { + properties._wheelchairAccessibleParking = 1; + if (typeof message.wheelchairAccessibleParking !== "boolean") + return "wheelchairAccessibleParking: boolean expected"; } - if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { - properties._outOfServiceCount = 1; - if (!$util.isInteger(message.outOfServiceCount)) - return "outOfServiceCount: integer expected"; + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + properties._wheelchairAccessibleEntrance = 1; + if (typeof message.wheelchairAccessibleEntrance !== "boolean") + return "wheelchairAccessibleEntrance: boolean expected"; } - if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.availabilityLastUpdateTime); - if (error) - return "availabilityLastUpdateTime." + error; + if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { + properties._wheelchairAccessibleRestroom = 1; + if (typeof message.wheelchairAccessibleRestroom !== "boolean") + return "wheelchairAccessibleRestroom: boolean expected"; + } + if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { + properties._wheelchairAccessibleSeating = 1; + if (typeof message.wheelchairAccessibleSeating !== "boolean") + return "wheelchairAccessibleSeating: boolean expected"; } return null; }; /** - * Creates a ConnectorAggregation message from a plain object. Also converts values to their respective internal types. + * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static * @param {Object.} object Plain object - * @returns {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} ConnectorAggregation + * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions */ - ConnectorAggregation.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation) + AccessibilityOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AccessibilityOptions) return object; - var message = new $root.google.maps.places.v1.EVChargeOptions.ConnectorAggregation(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "EV_CONNECTOR_TYPE_OTHER": - case 1: - message.type = 1; - break; - case "EV_CONNECTOR_TYPE_J1772": - case 2: - message.type = 2; - break; - case "EV_CONNECTOR_TYPE_TYPE_2": - case 3: - message.type = 3; - break; - case "EV_CONNECTOR_TYPE_CHADEMO": - case 4: - message.type = 4; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_1": - case 5: - message.type = 5; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_2": - case 6: - message.type = 6; - break; - case "EV_CONNECTOR_TYPE_TESLA": - case 7: - message.type = 7; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": - case 8: - message.type = 8; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": - case 9: - message.type = 9; - break; - } - if (object.maxChargeRateKw != null) - message.maxChargeRateKw = Number(object.maxChargeRateKw); - if (object.count != null) - message.count = object.count | 0; - if (object.availableCount != null) - message.availableCount = object.availableCount | 0; - if (object.outOfServiceCount != null) - message.outOfServiceCount = object.outOfServiceCount | 0; - if (object.availabilityLastUpdateTime != null) { - if (typeof object.availabilityLastUpdateTime !== "object") - throw TypeError(".google.maps.places.v1.EVChargeOptions.ConnectorAggregation.availabilityLastUpdateTime: object expected"); - message.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.availabilityLastUpdateTime); - } + var message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); + if (object.wheelchairAccessibleParking != null) + message.wheelchairAccessibleParking = Boolean(object.wheelchairAccessibleParking); + if (object.wheelchairAccessibleEntrance != null) + message.wheelchairAccessibleEntrance = Boolean(object.wheelchairAccessibleEntrance); + if (object.wheelchairAccessibleRestroom != null) + message.wheelchairAccessibleRestroom = Boolean(object.wheelchairAccessibleRestroom); + if (object.wheelchairAccessibleSeating != null) + message.wheelchairAccessibleSeating = Boolean(object.wheelchairAccessibleSeating); return message; }; /** - * Creates a plain object from a ConnectorAggregation message. Also converts values to other types if specified. + * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static - * @param {google.maps.places.v1.EVChargeOptions.ConnectorAggregation} message ConnectorAggregation + * @param {google.maps.places.v1.Place.AccessibilityOptions} message AccessibilityOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConnectorAggregation.toObject = function toObject(message, options) { + AccessibilityOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "EV_CONNECTOR_TYPE_UNSPECIFIED" : 0; - object.maxChargeRateKw = 0; - object.count = 0; - object.availabilityLastUpdateTime = null; + if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { + object.wheelchairAccessibleParking = message.wheelchairAccessibleParking; + if (options.oneofs) + object._wheelchairAccessibleParking = "wheelchairAccessibleParking"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.type] === undefined ? message.type : $root.google.maps.places.v1.EVConnectorType[message.type] : message.type; - if (message.maxChargeRateKw != null && message.hasOwnProperty("maxChargeRateKw")) - object.maxChargeRateKw = options.json && !isFinite(message.maxChargeRateKw) ? String(message.maxChargeRateKw) : message.maxChargeRateKw; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - if (message.availableCount != null && message.hasOwnProperty("availableCount")) { - object.availableCount = message.availableCount; + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + object.wheelchairAccessibleEntrance = message.wheelchairAccessibleEntrance; if (options.oneofs) - object._availableCount = "availableCount"; + object._wheelchairAccessibleEntrance = "wheelchairAccessibleEntrance"; } - if (message.outOfServiceCount != null && message.hasOwnProperty("outOfServiceCount")) { - object.outOfServiceCount = message.outOfServiceCount; + if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { + object.wheelchairAccessibleRestroom = message.wheelchairAccessibleRestroom; if (options.oneofs) - object._outOfServiceCount = "outOfServiceCount"; + object._wheelchairAccessibleRestroom = "wheelchairAccessibleRestroom"; } - if (message.availabilityLastUpdateTime != null && message.hasOwnProperty("availabilityLastUpdateTime")) - object.availabilityLastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.availabilityLastUpdateTime, options); - return object; + if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { + object.wheelchairAccessibleSeating = message.wheelchairAccessibleSeating; + if (options.oneofs) + object._wheelchairAccessibleSeating = "wheelchairAccessibleSeating"; + } + return object; }; /** - * Converts this ConnectorAggregation to JSON. + * Converts this AccessibilityOptions to JSON. * @function toJSON - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @instance * @returns {Object.} JSON object */ - ConnectorAggregation.prototype.toJSON = function toJSON() { + AccessibilityOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConnectorAggregation + * Gets the default type url for AccessibilityOptions * @function getTypeUrl - * @memberof google.maps.places.v1.EVChargeOptions.ConnectorAggregation + * @memberof google.maps.places.v1.Place.AccessibilityOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConnectorAggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AccessibilityOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.maps.places.v1.EVChargeOptions.ConnectorAggregation"; + return typeUrlPrefix + "/google.maps.places.v1.Place.AccessibilityOptions"; }; - return ConnectorAggregation; + return AccessibilityOptions; })(); - return EVChargeOptions; - })(); - - /** - * EVConnectorType enum. - * @name google.maps.places.v1.EVConnectorType - * @enum {number} - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED=0 EV_CONNECTOR_TYPE_UNSPECIFIED value - * @property {number} EV_CONNECTOR_TYPE_OTHER=1 EV_CONNECTOR_TYPE_OTHER value - * @property {number} EV_CONNECTOR_TYPE_J1772=2 EV_CONNECTOR_TYPE_J1772 value - * @property {number} EV_CONNECTOR_TYPE_TYPE_2=3 EV_CONNECTOR_TYPE_TYPE_2 value - * @property {number} EV_CONNECTOR_TYPE_CHADEMO=4 EV_CONNECTOR_TYPE_CHADEMO value - * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_1=5 EV_CONNECTOR_TYPE_CCS_COMBO_1 value - * @property {number} EV_CONNECTOR_TYPE_CCS_COMBO_2=6 EV_CONNECTOR_TYPE_CCS_COMBO_2 value - * @property {number} EV_CONNECTOR_TYPE_TESLA=7 EV_CONNECTOR_TYPE_TESLA value - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T=8 EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T value - * @property {number} EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET=9 EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET value - */ - v1.EVConnectorType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EV_CONNECTOR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EV_CONNECTOR_TYPE_OTHER"] = 1; - values[valuesById[2] = "EV_CONNECTOR_TYPE_J1772"] = 2; - values[valuesById[3] = "EV_CONNECTOR_TYPE_TYPE_2"] = 3; - values[valuesById[4] = "EV_CONNECTOR_TYPE_CHADEMO"] = 4; - values[valuesById[5] = "EV_CONNECTOR_TYPE_CCS_COMBO_1"] = 5; - values[valuesById[6] = "EV_CONNECTOR_TYPE_CCS_COMBO_2"] = 6; - values[valuesById[7] = "EV_CONNECTOR_TYPE_TESLA"] = 7; - values[valuesById[8] = "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T"] = 8; - values[valuesById[9] = "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET"] = 9; - return values; - })(); - - v1.FuelOptions = (function() { - - /** - * Properties of a FuelOptions. - * @memberof google.maps.places.v1 - * @interface IFuelOptions - * @property {Array.|null} [fuelPrices] FuelOptions fuelPrices - */ - - /** - * Constructs a new FuelOptions. - * @memberof google.maps.places.v1 - * @classdesc Represents a FuelOptions. - * @implements IFuelOptions - * @constructor - * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set - */ - function FuelOptions(properties) { - this.fuelPrices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FuelOptions fuelPrices. - * @member {Array.} fuelPrices - * @memberof google.maps.places.v1.FuelOptions - * @instance - */ - FuelOptions.prototype.fuelPrices = $util.emptyArray; - - /** - * Creates a new FuelOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.FuelOptions} FuelOptions instance - */ - FuelOptions.create = function create(properties) { - return new FuelOptions(properties); - }; - - /** - * Encodes the specified FuelOptions message. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fuelPrices != null && message.fuelPrices.length) - for (var i = 0; i < message.fuelPrices.length; ++i) - $root.google.maps.places.v1.FuelOptions.FuelPrice.encode(message.fuelPrices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FuelOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.IFuelOptions} message FuelOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FuelOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FuelOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.fuelPrices && message.fuelPrices.length)) - message.fuelPrices = []; - message.fuelPrices.push($root.google.maps.places.v1.FuelOptions.FuelPrice.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FuelOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FuelOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FuelOptions message. - * @function verify - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FuelOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fuelPrices != null && message.hasOwnProperty("fuelPrices")) { - if (!Array.isArray(message.fuelPrices)) - return "fuelPrices: array expected"; - for (var i = 0; i < message.fuelPrices.length; ++i) { - var error = $root.google.maps.places.v1.FuelOptions.FuelPrice.verify(message.fuelPrices[i]); - if (error) - return "fuelPrices." + error; - } - } - return null; - }; - - /** - * Creates a FuelOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.FuelOptions} FuelOptions - */ - FuelOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.FuelOptions) - return object; - var message = new $root.google.maps.places.v1.FuelOptions(); - if (object.fuelPrices) { - if (!Array.isArray(object.fuelPrices)) - throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: array expected"); - message.fuelPrices = []; - for (var i = 0; i < object.fuelPrices.length; ++i) { - if (typeof object.fuelPrices[i] !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.fuelPrices: object expected"); - message.fuelPrices[i] = $root.google.maps.places.v1.FuelOptions.FuelPrice.fromObject(object.fuelPrices[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FuelOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {google.maps.places.v1.FuelOptions} message FuelOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FuelOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fuelPrices = []; - if (message.fuelPrices && message.fuelPrices.length) { - object.fuelPrices = []; - for (var j = 0; j < message.fuelPrices.length; ++j) - object.fuelPrices[j] = $root.google.maps.places.v1.FuelOptions.FuelPrice.toObject(message.fuelPrices[j], options); - } - return object; - }; - - /** - * Converts this FuelOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.FuelOptions - * @instance - * @returns {Object.} JSON object - */ - FuelOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FuelOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.FuelOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FuelOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.FuelOptions"; - }; - - FuelOptions.FuelPrice = (function() { + Place.GenerativeSummary = (function() { /** - * Properties of a FuelPrice. - * @memberof google.maps.places.v1.FuelOptions - * @interface IFuelPrice - * @property {google.maps.places.v1.FuelOptions.FuelPrice.FuelType|null} [type] FuelPrice type - * @property {google.type.IMoney|null} [price] FuelPrice price - * @property {google.protobuf.ITimestamp|null} [updateTime] FuelPrice updateTime + * Properties of a GenerativeSummary. + * @memberof google.maps.places.v1.Place + * @interface IGenerativeSummary + * @property {google.type.ILocalizedText|null} [overview] GenerativeSummary overview + * @property {google.type.ILocalizedText|null} [description] GenerativeSummary description + * @property {google.maps.places.v1.IReferences|null} [references] GenerativeSummary references */ /** - * Constructs a new FuelPrice. - * @memberof google.maps.places.v1.FuelOptions - * @classdesc Represents a FuelPrice. - * @implements IFuelPrice + * Constructs a new GenerativeSummary. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a GenerativeSummary. + * @implements IGenerativeSummary * @constructor - * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set + * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set */ - function FuelPrice(properties) { + function GenerativeSummary(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14982,103 +11589,103 @@ } /** - * FuelPrice type. - * @member {google.maps.places.v1.FuelOptions.FuelPrice.FuelType} type - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * GenerativeSummary overview. + * @member {google.type.ILocalizedText|null|undefined} overview + * @memberof google.maps.places.v1.Place.GenerativeSummary * @instance */ - FuelPrice.prototype.type = 0; + GenerativeSummary.prototype.overview = null; /** - * FuelPrice price. - * @member {google.type.IMoney|null|undefined} price - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * GenerativeSummary description. + * @member {google.type.ILocalizedText|null|undefined} description + * @memberof google.maps.places.v1.Place.GenerativeSummary * @instance */ - FuelPrice.prototype.price = null; + GenerativeSummary.prototype.description = null; /** - * FuelPrice updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * GenerativeSummary references. + * @member {google.maps.places.v1.IReferences|null|undefined} references + * @memberof google.maps.places.v1.Place.GenerativeSummary * @instance */ - FuelPrice.prototype.updateTime = null; + GenerativeSummary.prototype.references = null; /** - * Creates a new FuelPrice instance using the specified properties. + * Creates a new GenerativeSummary instance using the specified properties. * @function create - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice=} [properties] Properties to set - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice instance + * @param {google.maps.places.v1.Place.IGenerativeSummary=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary instance */ - FuelPrice.create = function create(properties) { - return new FuelPrice(properties); + GenerativeSummary.create = function create(properties) { + return new GenerativeSummary(properties); }; /** - * Encodes the specified FuelPrice message. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * Encodes the specified GenerativeSummary message. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. * @function encode - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FuelPrice.encode = function encode(message, writer) { + GenerativeSummary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - $root.google.type.Money.encode(message.price, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + $root.google.type.LocalizedText.encode(message.overview, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.google.type.LocalizedText.encode(message.description, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified FuelPrice message, length delimited. Does not implicitly {@link google.maps.places.v1.FuelOptions.FuelPrice.verify|verify} messages. + * Encodes the specified GenerativeSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GenerativeSummary.verify|verify} messages. * @function encodeDelimited - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static - * @param {google.maps.places.v1.FuelOptions.IFuelPrice} message FuelPrice message or plain object to encode + * @param {google.maps.places.v1.Place.IGenerativeSummary} message GenerativeSummary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FuelPrice.encodeDelimited = function encodeDelimited(message, writer) { + GenerativeSummary.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FuelPrice message from the specified reader or buffer. + * Decodes a GenerativeSummary message from the specified reader or buffer. * @function decode - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FuelPrice.decode = function decode(reader, length) { + GenerativeSummary.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.GenerativeSummary(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.overview = $root.google.type.LocalizedText.decode(reader, reader.uint32()); break; } case 2: { - message.price = $root.google.type.Money.decode(reader, reader.uint32()); + message.description = $root.google.type.LocalizedText.decode(reader, reader.uint32()); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32()); break; } default: @@ -15090,661 +11697,815 @@ }; /** - * Decodes a FuelPrice message from the specified reader or buffer, length delimited. + * Decodes a GenerativeSummary message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FuelPrice.decodeDelimited = function decodeDelimited(reader) { + GenerativeSummary.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FuelPrice message. + * Verifies a GenerativeSummary message. * @function verify - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FuelPrice.verify = function verify(message) { + GenerativeSummary.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.price != null && message.hasOwnProperty("price")) { - var error = $root.google.type.Money.verify(message.price); + if (message.overview != null && message.hasOwnProperty("overview")) { + var error = $root.google.type.LocalizedText.verify(message.overview); if (error) - return "price." + error; + return "overview." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.google.type.LocalizedText.verify(message.description); if (error) - return "updateTime." + error; + return "description." + error; + } + if (message.references != null && message.hasOwnProperty("references")) { + var error = $root.google.maps.places.v1.References.verify(message.references); + if (error) + return "references." + error; } return null; }; /** - * Creates a FuelPrice message from a plain object. Also converts values to their respective internal types. + * Creates a GenerativeSummary message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static * @param {Object.} object Plain object - * @returns {google.maps.places.v1.FuelOptions.FuelPrice} FuelPrice + * @returns {google.maps.places.v1.Place.GenerativeSummary} GenerativeSummary */ - FuelPrice.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.FuelOptions.FuelPrice) + GenerativeSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.GenerativeSummary) return object; - var message = new $root.google.maps.places.v1.FuelOptions.FuelPrice(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FUEL_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DIESEL": - case 1: - message.type = 1; - break; - case "REGULAR_UNLEADED": - case 2: - message.type = 2; - break; - case "MIDGRADE": - case 3: - message.type = 3; - break; - case "PREMIUM": - case 4: - message.type = 4; - break; - case "SP91": - case 5: - message.type = 5; - break; - case "SP91_E10": - case 6: - message.type = 6; - break; - case "SP92": - case 7: - message.type = 7; - break; - case "SP95": - case 8: - message.type = 8; - break; - case "SP95_E10": - case 9: - message.type = 9; - break; - case "SP98": - case 10: - message.type = 10; - break; - case "SP99": - case 11: - message.type = 11; - break; - case "SP100": - case 12: - message.type = 12; - break; - case "LPG": - case 13: - message.type = 13; - break; - case "E80": - case 14: - message.type = 14; - break; - case "E85": - case 15: - message.type = 15; - break; - case "METHANE": - case 16: - message.type = 16; - break; - case "BIO_DIESEL": - case 17: - message.type = 17; - break; - case "TRUCK_DIESEL": - case 18: - message.type = 18; - break; + var message = new $root.google.maps.places.v1.Place.GenerativeSummary(); + if (object.overview != null) { + if (typeof object.overview !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.overview: object expected"); + message.overview = $root.google.type.LocalizedText.fromObject(object.overview); } - if (object.price != null) { - if (typeof object.price !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.price: object expected"); - message.price = $root.google.type.Money.fromObject(object.price); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.description: object expected"); + message.description = $root.google.type.LocalizedText.fromObject(object.description); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.maps.places.v1.FuelOptions.FuelPrice.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.references != null) { + if (typeof object.references !== "object") + throw TypeError(".google.maps.places.v1.Place.GenerativeSummary.references: object expected"); + message.references = $root.google.maps.places.v1.References.fromObject(object.references); } return message; }; /** - * Creates a plain object from a FuelPrice message. Also converts values to other types if specified. + * Creates a plain object from a GenerativeSummary message. Also converts values to other types if specified. * @function toObject - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static - * @param {google.maps.places.v1.FuelOptions.FuelPrice} message FuelPrice + * @param {google.maps.places.v1.Place.GenerativeSummary} message GenerativeSummary * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FuelPrice.toObject = function toObject(message, options) { + GenerativeSummary.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = options.enums === String ? "FUEL_TYPE_UNSPECIFIED" : 0; - object.price = null; - object.updateTime = null; + object.overview = null; + object.description = null; + object.references = null; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] === undefined ? message.type : $root.google.maps.places.v1.FuelOptions.FuelPrice.FuelType[message.type] : message.type; - if (message.price != null && message.hasOwnProperty("price")) - object.price = $root.google.type.Money.toObject(message.price, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = $root.google.type.LocalizedText.toObject(message.overview, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.google.type.LocalizedText.toObject(message.description, options); + if (message.references != null && message.hasOwnProperty("references")) + object.references = $root.google.maps.places.v1.References.toObject(message.references, options); return object; }; /** - * Converts this FuelPrice to JSON. + * Converts this GenerativeSummary to JSON. * @function toJSON - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @instance * @returns {Object.} JSON object */ - FuelPrice.prototype.toJSON = function toJSON() { + GenerativeSummary.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FuelPrice + * Gets the default type url for GenerativeSummary * @function getTypeUrl - * @memberof google.maps.places.v1.FuelOptions.FuelPrice + * @memberof google.maps.places.v1.Place.GenerativeSummary * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FuelPrice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerativeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.maps.places.v1.FuelOptions.FuelPrice"; + return typeUrlPrefix + "/google.maps.places.v1.Place.GenerativeSummary"; }; + return GenerativeSummary; + })(); + + Place.AreaSummary = (function() { + /** - * FuelType enum. - * @name google.maps.places.v1.FuelOptions.FuelPrice.FuelType - * @enum {number} - * @property {number} FUEL_TYPE_UNSPECIFIED=0 FUEL_TYPE_UNSPECIFIED value - * @property {number} DIESEL=1 DIESEL value - * @property {number} REGULAR_UNLEADED=2 REGULAR_UNLEADED value - * @property {number} MIDGRADE=3 MIDGRADE value - * @property {number} PREMIUM=4 PREMIUM value - * @property {number} SP91=5 SP91 value - * @property {number} SP91_E10=6 SP91_E10 value - * @property {number} SP92=7 SP92 value - * @property {number} SP95=8 SP95 value - * @property {number} SP95_E10=9 SP95_E10 value - * @property {number} SP98=10 SP98 value - * @property {number} SP99=11 SP99 value - * @property {number} SP100=12 SP100 value - * @property {number} LPG=13 LPG value - * @property {number} E80=14 E80 value - * @property {number} E85=15 E85 value - * @property {number} METHANE=16 METHANE value - * @property {number} BIO_DIESEL=17 BIO_DIESEL value - * @property {number} TRUCK_DIESEL=18 TRUCK_DIESEL value + * Properties of an AreaSummary. + * @memberof google.maps.places.v1.Place + * @interface IAreaSummary + * @property {Array.|null} [contentBlocks] AreaSummary contentBlocks */ - FuelPrice.FuelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FUEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIESEL"] = 1; - values[valuesById[2] = "REGULAR_UNLEADED"] = 2; - values[valuesById[3] = "MIDGRADE"] = 3; - values[valuesById[4] = "PREMIUM"] = 4; - values[valuesById[5] = "SP91"] = 5; - values[valuesById[6] = "SP91_E10"] = 6; - values[valuesById[7] = "SP92"] = 7; - values[valuesById[8] = "SP95"] = 8; - values[valuesById[9] = "SP95_E10"] = 9; - values[valuesById[10] = "SP98"] = 10; - values[valuesById[11] = "SP99"] = 11; - values[valuesById[12] = "SP100"] = 12; - values[valuesById[13] = "LPG"] = 13; - values[valuesById[14] = "E80"] = 14; - values[valuesById[15] = "E85"] = 15; - values[valuesById[16] = "METHANE"] = 16; - values[valuesById[17] = "BIO_DIESEL"] = 17; - values[valuesById[18] = "TRUCK_DIESEL"] = 18; - return values; - })(); - return FuelPrice; + /** + * Constructs a new AreaSummary. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AreaSummary. + * @implements IAreaSummary + * @constructor + * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set + */ + function AreaSummary(properties) { + this.contentBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AreaSummary contentBlocks. + * @member {Array.} contentBlocks + * @memberof google.maps.places.v1.Place.AreaSummary + * @instance + */ + AreaSummary.prototype.contentBlocks = $util.emptyArray; + + /** + * Creates a new AreaSummary instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary instance + */ + AreaSummary.create = function create(properties) { + return new AreaSummary(properties); + }; + + /** + * Encodes the specified AreaSummary message. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AreaSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentBlocks != null && message.contentBlocks.length) + for (var i = 0; i < message.contentBlocks.length; ++i) + $root.google.maps.places.v1.ContentBlock.encode(message.contentBlocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AreaSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AreaSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.IAreaSummary} message AreaSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AreaSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AreaSummary message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AreaSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AreaSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (!(message.contentBlocks && message.contentBlocks.length)) + message.contentBlocks = []; + message.contentBlocks.push($root.google.maps.places.v1.ContentBlock.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AreaSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AreaSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AreaSummary message. + * @function verify + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AreaSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentBlocks != null && message.hasOwnProperty("contentBlocks")) { + if (!Array.isArray(message.contentBlocks)) + return "contentBlocks: array expected"; + for (var i = 0; i < message.contentBlocks.length; ++i) { + var error = $root.google.maps.places.v1.ContentBlock.verify(message.contentBlocks[i]); + if (error) + return "contentBlocks." + error; + } + } + return null; + }; + + /** + * Creates an AreaSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AreaSummary} AreaSummary + */ + AreaSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AreaSummary) + return object; + var message = new $root.google.maps.places.v1.Place.AreaSummary(); + if (object.contentBlocks) { + if (!Array.isArray(object.contentBlocks)) + throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: array expected"); + message.contentBlocks = []; + for (var i = 0; i < object.contentBlocks.length; ++i) { + if (typeof object.contentBlocks[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.AreaSummary.contentBlocks: object expected"); + message.contentBlocks[i] = $root.google.maps.places.v1.ContentBlock.fromObject(object.contentBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AreaSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {google.maps.places.v1.Place.AreaSummary} message AreaSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AreaSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contentBlocks = []; + if (message.contentBlocks && message.contentBlocks.length) { + object.contentBlocks = []; + for (var j = 0; j < message.contentBlocks.length; ++j) + object.contentBlocks[j] = $root.google.maps.places.v1.ContentBlock.toObject(message.contentBlocks[j], options); + } + return object; + }; + + /** + * Converts this AreaSummary to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AreaSummary + * @instance + * @returns {Object.} JSON object + */ + AreaSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AreaSummary + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AreaSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AreaSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AreaSummary"; + }; + + return AreaSummary; })(); - return FuelOptions; + return Place; })(); - v1.Circle = (function() { + /** + * PriceLevel enum. + * @name google.maps.places.v1.PriceLevel + * @enum {number} + * @property {number} PRICE_LEVEL_UNSPECIFIED=0 PRICE_LEVEL_UNSPECIFIED value + * @property {number} PRICE_LEVEL_FREE=1 PRICE_LEVEL_FREE value + * @property {number} PRICE_LEVEL_INEXPENSIVE=2 PRICE_LEVEL_INEXPENSIVE value + * @property {number} PRICE_LEVEL_MODERATE=3 PRICE_LEVEL_MODERATE value + * @property {number} PRICE_LEVEL_EXPENSIVE=4 PRICE_LEVEL_EXPENSIVE value + * @property {number} PRICE_LEVEL_VERY_EXPENSIVE=5 PRICE_LEVEL_VERY_EXPENSIVE value + */ + v1.PriceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRICE_LEVEL_FREE"] = 1; + values[valuesById[2] = "PRICE_LEVEL_INEXPENSIVE"] = 2; + values[valuesById[3] = "PRICE_LEVEL_MODERATE"] = 3; + values[valuesById[4] = "PRICE_LEVEL_EXPENSIVE"] = 4; + values[valuesById[5] = "PRICE_LEVEL_VERY_EXPENSIVE"] = 5; + return values; + })(); - /** - * Properties of a Circle. - * @memberof google.maps.places.v1 - * @interface ICircle - * @property {google.type.ILatLng|null} [center] Circle center - * @property {number|null} [radius] Circle radius - */ + v1.Places = (function() { /** - * Constructs a new Circle. + * Constructs a new Places service. * @memberof google.maps.places.v1 - * @classdesc Represents a Circle. - * @implements ICircle + * @classdesc Represents a Places + * @extends $protobuf.rpc.Service * @constructor - * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function Circle(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Places(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * Circle center. - * @member {google.type.ILatLng|null|undefined} center - * @memberof google.maps.places.v1.Circle - * @instance - */ - Circle.prototype.center = null; - - /** - * Circle radius. - * @member {number} radius - * @memberof google.maps.places.v1.Circle - * @instance - */ - Circle.prototype.radius = 0; + (Places.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Places; /** - * Creates a new Circle instance using the specified properties. + * Creates new Places service using the specified rpc implementation. * @function create - * @memberof google.maps.places.v1.Circle + * @memberof google.maps.places.v1.Places * @static - * @param {google.maps.places.v1.ICircle=} [properties] Properties to set - * @returns {google.maps.places.v1.Circle} Circle instance + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Places} RPC service. Useful where requests and/or responses are streamed. */ - Circle.create = function create(properties) { - return new Circle(properties); + Places.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; /** - * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. + * @memberof google.maps.places.v1.Places + * @typedef SearchNearbyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.SearchNearbyResponse} [response] SearchNearbyResponse */ - Circle.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.center != null && Object.hasOwnProperty.call(message, "center")) - $root.google.type.LatLng.encode(message.center, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.radius != null && Object.hasOwnProperty.call(message, "radius")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.radius); - return writer; - }; /** - * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SearchNearby. + * @function searchNearby + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object + * @param {google.maps.places.v1.Places.SearchNearbyCallback} callback Node-style callback called with the error, if any, and SearchNearbyResponse + * @returns {undefined} + * @variation 1 */ - Circle.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Places.prototype.searchNearby = function searchNearby(request, callback) { + return this.rpcCall(searchNearby, $root.google.maps.places.v1.SearchNearbyRequest, $root.google.maps.places.v1.SearchNearbyResponse, request, callback); + }, "name", { value: "SearchNearby" }); /** - * Decodes a Circle message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Circle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Circle} Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SearchNearby. + * @function searchNearby + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Circle.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Circle(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.center = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 2: { - message.radius = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a Circle message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Circle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Circle} Circle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @memberof google.maps.places.v1.Places + * @typedef SearchTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.SearchTextResponse} [response] SearchTextResponse */ - Circle.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a Circle message. - * @function verify - * @memberof google.maps.places.v1.Circle - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @param {google.maps.places.v1.Places.SearchTextCallback} callback Node-style callback called with the error, if any, and SearchTextResponse + * @returns {undefined} + * @variation 1 */ - Circle.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.center != null && message.hasOwnProperty("center")) { - var error = $root.google.type.LatLng.verify(message.center); - if (error) - return "center." + error; - } - if (message.radius != null && message.hasOwnProperty("radius")) - if (typeof message.radius !== "number") - return "radius: number expected"; - return null; - }; + Object.defineProperty(Places.prototype.searchText = function searchText(request, callback) { + return this.rpcCall(searchText, $root.google.maps.places.v1.SearchTextRequest, $root.google.maps.places.v1.SearchTextResponse, request, callback); + }, "name", { value: "SearchText" }); /** - * Creates a Circle message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Circle - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Circle} Circle + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Circle.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Circle) - return object; - var message = new $root.google.maps.places.v1.Circle(); - if (object.center != null) { - if (typeof object.center !== "object") - throw TypeError(".google.maps.places.v1.Circle.center: object expected"); - message.center = $root.google.type.LatLng.fromObject(object.center); - } - if (object.radius != null) - message.radius = Number(object.radius); - return message; - }; /** - * Creates a plain object from a Circle message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Circle - * @static - * @param {google.maps.places.v1.Circle} message Circle - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. + * @memberof google.maps.places.v1.Places + * @typedef GetPhotoMediaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.PhotoMedia} [response] PhotoMedia */ - Circle.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.center = null; - object.radius = 0; - } - if (message.center != null && message.hasOwnProperty("center")) - object.center = $root.google.type.LatLng.toObject(message.center, options); - if (message.radius != null && message.hasOwnProperty("radius")) - object.radius = options.json && !isFinite(message.radius) ? String(message.radius) : message.radius; - return object; - }; /** - * Converts this Circle to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Circle + * Calls GetPhotoMedia. + * @function getPhotoMedia + * @memberof google.maps.places.v1.Places * @instance - * @returns {Object.} JSON object + * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object + * @param {google.maps.places.v1.Places.GetPhotoMediaCallback} callback Node-style callback called with the error, if any, and PhotoMedia + * @returns {undefined} + * @variation 1 */ - Circle.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(Places.prototype.getPhotoMedia = function getPhotoMedia(request, callback) { + return this.rpcCall(getPhotoMedia, $root.google.maps.places.v1.GetPhotoMediaRequest, $root.google.maps.places.v1.PhotoMedia, request, callback); + }, "name", { value: "GetPhotoMedia" }); /** - * Gets the default type url for Circle - * @function getTypeUrl - * @memberof google.maps.places.v1.Circle - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls GetPhotoMedia. + * @function getPhotoMedia + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Circle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Circle"; - }; - - return Circle; - })(); - - v1.Photo = (function() { /** - * Properties of a Photo. - * @memberof google.maps.places.v1 - * @interface IPhoto - * @property {string|null} [name] Photo name - * @property {number|null} [widthPx] Photo widthPx - * @property {number|null} [heightPx] Photo heightPx - * @property {Array.|null} [authorAttributions] Photo authorAttributions + * Callback as used by {@link google.maps.places.v1.Places|getPlace}. + * @memberof google.maps.places.v1.Places + * @typedef GetPlaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.Place} [response] Place */ /** - * Constructs a new Photo. - * @memberof google.maps.places.v1 - * @classdesc Represents a Photo. - * @implements IPhoto - * @constructor - * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set + * Calls GetPlace. + * @function getPlace + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object + * @param {google.maps.places.v1.Places.GetPlaceCallback} callback Node-style callback called with the error, if any, and Place + * @returns {undefined} + * @variation 1 */ - function Photo(properties) { - this.authorAttributions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(Places.prototype.getPlace = function getPlace(request, callback) { + return this.rpcCall(getPlace, $root.google.maps.places.v1.GetPlaceRequest, $root.google.maps.places.v1.Place, request, callback); + }, "name", { value: "GetPlace" }); /** - * Photo name. - * @member {string} name - * @memberof google.maps.places.v1.Photo + * Calls GetPlace. + * @function getPlace + * @memberof google.maps.places.v1.Places * @instance + * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Photo.prototype.name = ""; /** - * Photo widthPx. - * @member {number} widthPx - * @memberof google.maps.places.v1.Photo + * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. + * @memberof google.maps.places.v1.Places + * @typedef AutocompletePlacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.AutocompletePlacesResponse} [response] AutocompletePlacesResponse + */ + + /** + * Calls AutocompletePlaces. + * @function autocompletePlaces + * @memberof google.maps.places.v1.Places * @instance + * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object + * @param {google.maps.places.v1.Places.AutocompletePlacesCallback} callback Node-style callback called with the error, if any, and AutocompletePlacesResponse + * @returns {undefined} + * @variation 1 */ - Photo.prototype.widthPx = 0; + Object.defineProperty(Places.prototype.autocompletePlaces = function autocompletePlaces(request, callback) { + return this.rpcCall(autocompletePlaces, $root.google.maps.places.v1.AutocompletePlacesRequest, $root.google.maps.places.v1.AutocompletePlacesResponse, request, callback); + }, "name", { value: "AutocompletePlaces" }); /** - * Photo heightPx. - * @member {number} heightPx - * @memberof google.maps.places.v1.Photo + * Calls AutocompletePlaces. + * @function autocompletePlaces + * @memberof google.maps.places.v1.Places * @instance + * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Photo.prototype.heightPx = 0; + + return Places; + })(); + + v1.SearchNearbyRequest = (function() { /** - * Photo authorAttributions. - * @member {Array.} authorAttributions - * @memberof google.maps.places.v1.Photo + * Properties of a SearchNearbyRequest. + * @memberof google.maps.places.v1 + * @interface ISearchNearbyRequest + * @property {string|null} [languageCode] SearchNearbyRequest languageCode + * @property {string|null} [regionCode] SearchNearbyRequest regionCode + * @property {Array.|null} [includedTypes] SearchNearbyRequest includedTypes + * @property {Array.|null} [excludedTypes] SearchNearbyRequest excludedTypes + * @property {Array.|null} [includedPrimaryTypes] SearchNearbyRequest includedPrimaryTypes + * @property {Array.|null} [excludedPrimaryTypes] SearchNearbyRequest excludedPrimaryTypes + * @property {number|null} [maxResultCount] SearchNearbyRequest maxResultCount + * @property {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null} [locationRestriction] SearchNearbyRequest locationRestriction + * @property {google.maps.places.v1.SearchNearbyRequest.RankPreference|null} [rankPreference] SearchNearbyRequest rankPreference + */ + + /** + * Constructs a new SearchNearbyRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchNearbyRequest. + * @implements ISearchNearbyRequest + * @constructor + * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set + */ + function SearchNearbyRequest(properties) { + this.includedTypes = []; + this.excludedTypes = []; + this.includedPrimaryTypes = []; + this.excludedPrimaryTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchNearbyRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.SearchNearbyRequest * @instance */ - Photo.prototype.authorAttributions = $util.emptyArray; + SearchNearbyRequest.prototype.languageCode = ""; /** - * Creates a new Photo instance using the specified properties. + * SearchNearbyRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.regionCode = ""; + + /** + * SearchNearbyRequest includedTypes. + * @member {Array.} includedTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.includedTypes = $util.emptyArray; + + /** + * SearchNearbyRequest excludedTypes. + * @member {Array.} excludedTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.excludedTypes = $util.emptyArray; + + /** + * SearchNearbyRequest includedPrimaryTypes. + * @member {Array.} includedPrimaryTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.includedPrimaryTypes = $util.emptyArray; + + /** + * SearchNearbyRequest excludedPrimaryTypes. + * @member {Array.} excludedPrimaryTypes + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.excludedPrimaryTypes = $util.emptyArray; + + /** + * SearchNearbyRequest maxResultCount. + * @member {number} maxResultCount + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.maxResultCount = 0; + + /** + * SearchNearbyRequest locationRestriction. + * @member {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.locationRestriction = null; + + /** + * SearchNearbyRequest rankPreference. + * @member {google.maps.places.v1.SearchNearbyRequest.RankPreference} rankPreference + * @memberof google.maps.places.v1.SearchNearbyRequest + * @instance + */ + SearchNearbyRequest.prototype.rankPreference = 0; + + /** + * Creates a new SearchNearbyRequest instance using the specified properties. * @function create - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static - * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set - * @returns {google.maps.places.v1.Photo} Photo instance + * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest instance */ - Photo.create = function create(properties) { - return new Photo(properties); + SearchNearbyRequest.create = function create(properties) { + return new SearchNearbyRequest(properties); }; /** - * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. * @function encode - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static - * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Photo.encode = function encode(message, writer) { + SearchNearbyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx); - if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx); - if (message.authorAttributions != null && message.authorAttributions.length) - for (var i = 0; i < message.authorAttributions.length; ++i) - $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); + if (message.includedTypes != null && message.includedTypes.length) + for (var i = 0; i < message.includedTypes.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.includedTypes[i]); + if (message.excludedTypes != null && message.excludedTypes.length) + for (var i = 0; i < message.excludedTypes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedTypes[i]); + if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedPrimaryTypes[i]); + if (message.excludedPrimaryTypes != null && message.excludedPrimaryTypes.length) + for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedPrimaryTypes[i]); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxResultCount); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rankPreference); return writer; }; /** - * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages. + * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static - * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode + * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Photo.encodeDelimited = function encodeDelimited(message, writer) { + SearchNearbyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Photo message from the specified reader or buffer. + * Decodes a SearchNearbyRequest message from the specified reader or buffer. * @function decode - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Photo} Photo + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Photo.decode = function decode(reader, length) { + SearchNearbyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.languageCode = reader.string(); break; } case 2: { - message.widthPx = reader.int32(); + message.regionCode = reader.string(); break; } case 3: { - message.heightPx = reader.int32(); + if (!(message.includedTypes && message.includedTypes.length)) + message.includedTypes = []; + message.includedTypes.push(reader.string()); break; } case 4: { - if (!(message.authorAttributions && message.authorAttributions.length)) - message.authorAttributions = []; - message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32())); + if (!(message.excludedTypes && message.excludedTypes.length)) + message.excludedTypes = []; + message.excludedTypes.push(reader.string()); + break; + } + case 5: { + if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) + message.includedPrimaryTypes = []; + message.includedPrimaryTypes.push(reader.string()); + break; + } + case 6: { + if (!(message.excludedPrimaryTypes && message.excludedPrimaryTypes.length)) + message.excludedPrimaryTypes = []; + message.excludedPrimaryTypes.push(reader.string()); + break; + } + case 7: { + message.maxResultCount = reader.int32(); + break; + } + case 8: { + message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 9: { + message.rankPreference = reader.int32(); break; } default: @@ -15756,233 +12517,510 @@ }; /** - * Decodes a Photo message from the specified reader or buffer, length delimited. + * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Photo} Photo + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Photo.decodeDelimited = function decodeDelimited(reader) { + SearchNearbyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Photo message. + * Verifies a SearchNearbyRequest message. * @function verify - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Photo.verify = function verify(message) { + SearchNearbyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.widthPx != null && message.hasOwnProperty("widthPx")) - if (!$util.isInteger(message.widthPx)) - return "widthPx: integer expected"; - if (message.heightPx != null && message.hasOwnProperty("heightPx")) - if (!$util.isInteger(message.heightPx)) - return "heightPx: integer expected"; - if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) { - if (!Array.isArray(message.authorAttributions)) - return "authorAttributions: array expected"; - for (var i = 0; i < message.authorAttributions.length; ++i) { - var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]); - if (error) - return "authorAttributions." + error; - } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.includedTypes != null && message.hasOwnProperty("includedTypes")) { + if (!Array.isArray(message.includedTypes)) + return "includedTypes: array expected"; + for (var i = 0; i < message.includedTypes.length; ++i) + if (!$util.isString(message.includedTypes[i])) + return "includedTypes: string[] expected"; + } + if (message.excludedTypes != null && message.hasOwnProperty("excludedTypes")) { + if (!Array.isArray(message.excludedTypes)) + return "excludedTypes: array expected"; + for (var i = 0; i < message.excludedTypes.length; ++i) + if (!$util.isString(message.excludedTypes[i])) + return "excludedTypes: string[] expected"; + } + if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { + if (!Array.isArray(message.includedPrimaryTypes)) + return "includedPrimaryTypes: array expected"; + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + if (!$util.isString(message.includedPrimaryTypes[i])) + return "includedPrimaryTypes: string[] expected"; + } + if (message.excludedPrimaryTypes != null && message.hasOwnProperty("excludedPrimaryTypes")) { + if (!Array.isArray(message.excludedPrimaryTypes)) + return "excludedPrimaryTypes: array expected"; + for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) + if (!$util.isString(message.excludedPrimaryTypes[i])) + return "excludedPrimaryTypes: string[] expected"; + } + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; } + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + switch (message.rankPreference) { + default: + return "rankPreference: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Photo message from a plain object. Also converts values to their respective internal types. + * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Photo} Photo + * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest */ - Photo.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Photo) + SearchNearbyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest) return object; - var message = new $root.google.maps.places.v1.Photo(); - if (object.name != null) - message.name = String(object.name); - if (object.widthPx != null) - message.widthPx = object.widthPx | 0; - if (object.heightPx != null) - message.heightPx = object.heightPx | 0; - if (object.authorAttributions) { - if (!Array.isArray(object.authorAttributions)) - throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected"); - message.authorAttributions = []; - for (var i = 0; i < object.authorAttributions.length; ++i) { - if (typeof object.authorAttributions[i] !== "object") - throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected"); - message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]); + var message = new $root.google.maps.places.v1.SearchNearbyRequest(); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.includedTypes) { + if (!Array.isArray(object.includedTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedTypes: array expected"); + message.includedTypes = []; + for (var i = 0; i < object.includedTypes.length; ++i) + message.includedTypes[i] = String(object.includedTypes[i]); + } + if (object.excludedTypes) { + if (!Array.isArray(object.excludedTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedTypes: array expected"); + message.excludedTypes = []; + for (var i = 0; i < object.excludedTypes.length; ++i) + message.excludedTypes[i] = String(object.excludedTypes[i]); + } + if (object.includedPrimaryTypes) { + if (!Array.isArray(object.includedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedPrimaryTypes: array expected"); + message.includedPrimaryTypes = []; + for (var i = 0; i < object.includedPrimaryTypes.length; ++i) + message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); + } + if (object.excludedPrimaryTypes) { + if (!Array.isArray(object.excludedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedPrimaryTypes: array expected"); + message.excludedPrimaryTypes = []; + for (var i = 0; i < object.excludedPrimaryTypes.length; ++i) + message.excludedPrimaryTypes[i] = String(object.excludedPrimaryTypes[i]); + } + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.fromObject(object.locationRestriction); + } + switch (object.rankPreference) { + default: + if (typeof object.rankPreference === "number") { + message.rankPreference = object.rankPreference; + break; } + break; + case "RANK_PREFERENCE_UNSPECIFIED": + case 0: + message.rankPreference = 0; + break; + case "DISTANCE": + case 1: + message.rankPreference = 1; + break; + case "POPULARITY": + case 2: + message.rankPreference = 2; + break; } return message; }; /** - * Creates a plain object from a Photo message. Also converts values to other types if specified. + * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static - * @param {google.maps.places.v1.Photo} message Photo + * @param {google.maps.places.v1.SearchNearbyRequest} message SearchNearbyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Photo.toObject = function toObject(message, options) { + SearchNearbyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.authorAttributions = []; + if (options.arrays || options.defaults) { + object.includedTypes = []; + object.excludedTypes = []; + object.includedPrimaryTypes = []; + object.excludedPrimaryTypes = []; + } if (options.defaults) { - object.name = ""; - object.widthPx = 0; - object.heightPx = 0; + object.languageCode = ""; + object.regionCode = ""; + object.maxResultCount = 0; + object.locationRestriction = null; + object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.widthPx != null && message.hasOwnProperty("widthPx")) - object.widthPx = message.widthPx; - if (message.heightPx != null && message.hasOwnProperty("heightPx")) - object.heightPx = message.heightPx; - if (message.authorAttributions && message.authorAttributions.length) { - object.authorAttributions = []; - for (var j = 0; j < message.authorAttributions.length; ++j) - object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.includedTypes && message.includedTypes.length) { + object.includedTypes = []; + for (var j = 0; j < message.includedTypes.length; ++j) + object.includedTypes[j] = message.includedTypes[j]; + } + if (message.excludedTypes && message.excludedTypes.length) { + object.excludedTypes = []; + for (var j = 0; j < message.excludedTypes.length; ++j) + object.excludedTypes[j] = message.excludedTypes[j]; + } + if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { + object.includedPrimaryTypes = []; + for (var j = 0; j < message.includedPrimaryTypes.length; ++j) + object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; + } + if (message.excludedPrimaryTypes && message.excludedPrimaryTypes.length) { + object.excludedPrimaryTypes = []; + for (var j = 0; j < message.excludedPrimaryTypes.length; ++j) + object.excludedPrimaryTypes[j] = message.excludedPrimaryTypes[j]; } + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] : message.rankPreference; return object; }; /** - * Converts this Photo to JSON. + * Converts this SearchNearbyRequest to JSON. * @function toJSON - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @instance * @returns {Object.} JSON object */ - Photo.prototype.toJSON = function toJSON() { + SearchNearbyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Photo + * Gets the default type url for SearchNearbyRequest * @function getTypeUrl - * @memberof google.maps.places.v1.Photo + * @memberof google.maps.places.v1.SearchNearbyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchNearbyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.maps.places.v1.Photo"; + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest"; }; - return Photo; - })(); + SearchNearbyRequest.LocationRestriction = (function() { - v1.Place = (function() { + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.SearchNearbyRequest + * @interface ILocationRestriction + * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle + */ - /** - * Properties of a Place. - * @memberof google.maps.places.v1 - * @interface IPlace - * @property {string|null} [name] Place name - * @property {string|null} [id] Place id - * @property {google.type.ILocalizedText|null} [displayName] Place displayName - * @property {Array.|null} [types] Place types - * @property {string|null} [primaryType] Place primaryType - * @property {google.type.ILocalizedText|null} [primaryTypeDisplayName] Place primaryTypeDisplayName - * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber - * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber - * @property {string|null} [formattedAddress] Place formattedAddress - * @property {string|null} [shortFormattedAddress] Place shortFormattedAddress - * @property {Array.|null} [addressComponents] Place addressComponents - * @property {google.maps.places.v1.Place.IPlusCode|null} [plusCode] Place plusCode - * @property {google.type.ILatLng|null} [location] Place location - * @property {google.geo.type.IViewport|null} [viewport] Place viewport - * @property {number|null} [rating] Place rating - * @property {string|null} [googleMapsUri] Place googleMapsUri - * @property {string|null} [websiteUri] Place websiteUri - * @property {Array.|null} [reviews] Place reviews - * @property {google.maps.places.v1.Place.IOpeningHours|null} [regularOpeningHours] Place regularOpeningHours - * @property {number|null} [utcOffsetMinutes] Place utcOffsetMinutes - * @property {Array.|null} [photos] Place photos - * @property {string|null} [adrFormatAddress] Place adrFormatAddress - * @property {google.maps.places.v1.Place.BusinessStatus|null} [businessStatus] Place businessStatus - * @property {google.maps.places.v1.PriceLevel|null} [priceLevel] Place priceLevel - * @property {Array.|null} [attributions] Place attributions - * @property {number|null} [userRatingCount] Place userRatingCount - * @property {string|null} [iconMaskBaseUri] Place iconMaskBaseUri - * @property {string|null} [iconBackgroundColor] Place iconBackgroundColor - * @property {boolean|null} [takeout] Place takeout - * @property {boolean|null} [delivery] Place delivery - * @property {boolean|null} [dineIn] Place dineIn - * @property {boolean|null} [curbsidePickup] Place curbsidePickup - * @property {boolean|null} [reservable] Place reservable - * @property {boolean|null} [servesBreakfast] Place servesBreakfast - * @property {boolean|null} [servesLunch] Place servesLunch - * @property {boolean|null} [servesDinner] Place servesDinner - * @property {boolean|null} [servesBeer] Place servesBeer - * @property {boolean|null} [servesWine] Place servesWine - * @property {boolean|null} [servesBrunch] Place servesBrunch - * @property {boolean|null} [servesVegetarianFood] Place servesVegetarianFood - * @property {google.maps.places.v1.Place.IOpeningHours|null} [currentOpeningHours] Place currentOpeningHours - * @property {Array.|null} [currentSecondaryOpeningHours] Place currentSecondaryOpeningHours - * @property {Array.|null} [regularSecondaryOpeningHours] Place regularSecondaryOpeningHours - * @property {google.type.ILocalizedText|null} [editorialSummary] Place editorialSummary - * @property {boolean|null} [outdoorSeating] Place outdoorSeating - * @property {boolean|null} [liveMusic] Place liveMusic - * @property {boolean|null} [menuForChildren] Place menuForChildren - * @property {boolean|null} [servesCocktails] Place servesCocktails - * @property {boolean|null} [servesDessert] Place servesDessert - * @property {boolean|null} [servesCoffee] Place servesCoffee - * @property {boolean|null} [goodForChildren] Place goodForChildren - * @property {boolean|null} [allowsDogs] Place allowsDogs - * @property {boolean|null} [restroom] Place restroom - * @property {boolean|null} [goodForGroups] Place goodForGroups - * @property {boolean|null} [goodForWatchingSports] Place goodForWatchingSports - * @property {google.maps.places.v1.Place.IPaymentOptions|null} [paymentOptions] Place paymentOptions - * @property {google.maps.places.v1.Place.IParkingOptions|null} [parkingOptions] Place parkingOptions - * @property {Array.|null} [subDestinations] Place subDestinations - * @property {google.maps.places.v1.Place.IAccessibilityOptions|null} [accessibilityOptions] Place accessibilityOptions - * @property {google.maps.places.v1.IFuelOptions|null} [fuelOptions] Place fuelOptions - * @property {google.maps.places.v1.IEVChargeOptions|null} [evChargeOptions] Place evChargeOptions + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.SearchNearbyRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationRestriction circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"circle"|undefined} type + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.circle != null && message.hasOwnProperty("circle")) { + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyRequest.LocationRestriction.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + /** + * RankPreference enum. + * @name google.maps.places.v1.SearchNearbyRequest.RankPreference + * @enum {number} + * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value + * @property {number} DISTANCE=1 DISTANCE value + * @property {number} POPULARITY=2 POPULARITY value + */ + SearchNearbyRequest.RankPreference = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISTANCE"] = 1; + values[valuesById[2] = "POPULARITY"] = 2; + return values; + })(); + + return SearchNearbyRequest; + })(); + + v1.SearchNearbyResponse = (function() { + + /** + * Properties of a SearchNearbyResponse. + * @memberof google.maps.places.v1 + * @interface ISearchNearbyResponse + * @property {Array.|null} [places] SearchNearbyResponse places */ /** - * Constructs a new Place. + * Constructs a new SearchNearbyResponse. * @memberof google.maps.places.v1 - * @classdesc Represents a Place. - * @implements IPlace + * @classdesc Represents a SearchNearbyResponse. + * @implements ISearchNearbyResponse * @constructor - * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set */ - function Place(properties) { - this.types = []; - this.addressComponents = []; - this.reviews = []; - this.photos = []; - this.attributions = []; - this.currentSecondaryOpeningHours = []; - this.regularSecondaryOpeningHours = []; - this.subDestinations = []; + function SearchNearbyResponse(properties) { + this.places = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15990,1228 +13028,1719 @@ } /** - * Place name. - * @member {string} name - * @memberof google.maps.places.v1.Place + * SearchNearbyResponse places. + * @member {Array.} places + * @memberof google.maps.places.v1.SearchNearbyResponse * @instance */ - Place.prototype.name = ""; + SearchNearbyResponse.prototype.places = $util.emptyArray; /** - * Place id. - * @member {string} id - * @memberof google.maps.places.v1.Place - * @instance + * Creates a new SearchNearbyResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse instance */ - Place.prototype.id = ""; + SearchNearbyResponse.create = function create(properties) { + return new SearchNearbyResponse(properties); + }; /** - * Place displayName. - * @member {google.type.ILocalizedText|null|undefined} displayName - * @memberof google.maps.places.v1.Place - * @instance + * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Place.prototype.displayName = null; + SearchNearbyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Place types. - * @member {Array.} types - * @memberof google.maps.places.v1.Place - * @instance + * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Place.prototype.types = $util.emptyArray; + SearchNearbyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Place primaryType. - * @member {string} primaryType - * @memberof google.maps.places.v1.Place - * @instance + * Decodes a SearchNearbyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.prototype.primaryType = ""; + SearchNearbyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Place primaryTypeDisplayName. - * @member {google.type.ILocalizedText|null|undefined} primaryTypeDisplayName - * @memberof google.maps.places.v1.Place - * @instance + * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.prototype.primaryTypeDisplayName = null; + SearchNearbyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Place nationalPhoneNumber. - * @member {string} nationalPhoneNumber - * @memberof google.maps.places.v1.Place - * @instance + * Verifies a SearchNearbyResponse message. + * @function verify + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Place.prototype.nationalPhoneNumber = ""; + SearchNearbyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) { + var error = $root.google.maps.places.v1.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; /** - * Place internationalPhoneNumber. - * @member {string} internationalPhoneNumber - * @memberof google.maps.places.v1.Place - * @instance + * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse */ - Place.prototype.internationalPhoneNumber = ""; + SearchNearbyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchNearbyResponse) + return object; + var message = new $root.google.maps.places.v1.SearchNearbyResponse(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: object expected"); + message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); + } + } + return message; + }; /** - * Place formattedAddress. - * @member {string} formattedAddress - * @memberof google.maps.places.v1.Place - * @instance + * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {google.maps.places.v1.SearchNearbyResponse} message SearchNearbyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Place.prototype.formattedAddress = ""; + SearchNearbyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); + } + return object; + }; /** - * Place shortFormattedAddress. - * @member {string} shortFormattedAddress - * @memberof google.maps.places.v1.Place + * Converts this SearchNearbyResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchNearbyResponse * @instance + * @returns {Object.} JSON object */ - Place.prototype.shortFormattedAddress = ""; - - /** - * Place addressComponents. - * @member {Array.} addressComponents - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.addressComponents = $util.emptyArray; - - /** - * Place plusCode. - * @member {google.maps.places.v1.Place.IPlusCode|null|undefined} plusCode - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.plusCode = null; - - /** - * Place location. - * @member {google.type.ILatLng|null|undefined} location - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.location = null; - - /** - * Place viewport. - * @member {google.geo.type.IViewport|null|undefined} viewport - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.viewport = null; - - /** - * Place rating. - * @member {number} rating - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.rating = 0; - - /** - * Place googleMapsUri. - * @member {string} googleMapsUri - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.googleMapsUri = ""; - - /** - * Place websiteUri. - * @member {string} websiteUri - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.websiteUri = ""; + SearchNearbyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Place reviews. - * @member {Array.} reviews - * @memberof google.maps.places.v1.Place - * @instance + * Gets the default type url for SearchNearbyResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchNearbyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Place.prototype.reviews = $util.emptyArray; + SearchNearbyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyResponse"; + }; - /** - * Place regularOpeningHours. - * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} regularOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.regularOpeningHours = null; + return SearchNearbyResponse; + })(); - /** - * Place utcOffsetMinutes. - * @member {number|null|undefined} utcOffsetMinutes - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.utcOffsetMinutes = null; + v1.SearchTextRequest = (function() { /** - * Place photos. - * @member {Array.} photos - * @memberof google.maps.places.v1.Place - * @instance + * Properties of a SearchTextRequest. + * @memberof google.maps.places.v1 + * @interface ISearchTextRequest + * @property {string|null} [textQuery] SearchTextRequest textQuery + * @property {string|null} [languageCode] SearchTextRequest languageCode + * @property {string|null} [regionCode] SearchTextRequest regionCode + * @property {google.maps.places.v1.SearchTextRequest.RankPreference|null} [rankPreference] SearchTextRequest rankPreference + * @property {string|null} [includedType] SearchTextRequest includedType + * @property {boolean|null} [openNow] SearchTextRequest openNow + * @property {number|null} [minRating] SearchTextRequest minRating + * @property {number|null} [maxResultCount] SearchTextRequest maxResultCount + * @property {Array.|null} [priceLevels] SearchTextRequest priceLevels + * @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering + * @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias + * @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction + * @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions */ - Place.prototype.photos = $util.emptyArray; /** - * Place adrFormatAddress. - * @member {string} adrFormatAddress - * @memberof google.maps.places.v1.Place - * @instance + * Constructs a new SearchTextRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextRequest. + * @implements ISearchTextRequest + * @constructor + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set */ - Place.prototype.adrFormatAddress = ""; + function SearchTextRequest(properties) { + this.priceLevels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Place businessStatus. - * @member {google.maps.places.v1.Place.BusinessStatus} businessStatus - * @memberof google.maps.places.v1.Place + * SearchTextRequest textQuery. + * @member {string} textQuery + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.businessStatus = 0; + SearchTextRequest.prototype.textQuery = ""; /** - * Place priceLevel. - * @member {google.maps.places.v1.PriceLevel} priceLevel - * @memberof google.maps.places.v1.Place + * SearchTextRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.priceLevel = 0; + SearchTextRequest.prototype.languageCode = ""; /** - * Place attributions. - * @member {Array.} attributions - * @memberof google.maps.places.v1.Place + * SearchTextRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.attributions = $util.emptyArray; + SearchTextRequest.prototype.regionCode = ""; /** - * Place userRatingCount. - * @member {number|null|undefined} userRatingCount - * @memberof google.maps.places.v1.Place + * SearchTextRequest rankPreference. + * @member {google.maps.places.v1.SearchTextRequest.RankPreference} rankPreference + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.userRatingCount = null; + SearchTextRequest.prototype.rankPreference = 0; /** - * Place iconMaskBaseUri. - * @member {string} iconMaskBaseUri - * @memberof google.maps.places.v1.Place + * SearchTextRequest includedType. + * @member {string} includedType + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.iconMaskBaseUri = ""; + SearchTextRequest.prototype.includedType = ""; /** - * Place iconBackgroundColor. - * @member {string} iconBackgroundColor - * @memberof google.maps.places.v1.Place + * SearchTextRequest openNow. + * @member {boolean} openNow + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.iconBackgroundColor = ""; + SearchTextRequest.prototype.openNow = false; /** - * Place takeout. - * @member {boolean|null|undefined} takeout - * @memberof google.maps.places.v1.Place + * SearchTextRequest minRating. + * @member {number} minRating + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.takeout = null; + SearchTextRequest.prototype.minRating = 0; /** - * Place delivery. - * @member {boolean|null|undefined} delivery - * @memberof google.maps.places.v1.Place + * SearchTextRequest maxResultCount. + * @member {number} maxResultCount + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.delivery = null; + SearchTextRequest.prototype.maxResultCount = 0; /** - * Place dineIn. - * @member {boolean|null|undefined} dineIn - * @memberof google.maps.places.v1.Place + * SearchTextRequest priceLevels. + * @member {Array.} priceLevels + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.dineIn = null; + SearchTextRequest.prototype.priceLevels = $util.emptyArray; /** - * Place curbsidePickup. - * @member {boolean|null|undefined} curbsidePickup - * @memberof google.maps.places.v1.Place + * SearchTextRequest strictTypeFiltering. + * @member {boolean} strictTypeFiltering + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.curbsidePickup = null; + SearchTextRequest.prototype.strictTypeFiltering = false; /** - * Place reservable. - * @member {boolean|null|undefined} reservable - * @memberof google.maps.places.v1.Place + * SearchTextRequest locationBias. + * @member {google.maps.places.v1.SearchTextRequest.ILocationBias|null|undefined} locationBias + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.reservable = null; + SearchTextRequest.prototype.locationBias = null; /** - * Place servesBreakfast. - * @member {boolean|null|undefined} servesBreakfast - * @memberof google.maps.places.v1.Place + * SearchTextRequest locationRestriction. + * @member {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.servesBreakfast = null; + SearchTextRequest.prototype.locationRestriction = null; /** - * Place servesLunch. - * @member {boolean|null|undefined} servesLunch - * @memberof google.maps.places.v1.Place + * SearchTextRequest evOptions. + * @member {google.maps.places.v1.SearchTextRequest.IEVOptions|null|undefined} evOptions + * @memberof google.maps.places.v1.SearchTextRequest * @instance */ - Place.prototype.servesLunch = null; + SearchTextRequest.prototype.evOptions = null; /** - * Place servesDinner. - * @member {boolean|null|undefined} servesDinner - * @memberof google.maps.places.v1.Place - * @instance + * Creates a new SearchTextRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest instance */ - Place.prototype.servesDinner = null; + SearchTextRequest.create = function create(properties) { + return new SearchTextRequest(properties); + }; /** - * Place servesBeer. - * @member {boolean|null|undefined} servesBeer - * @memberof google.maps.places.v1.Place - * @instance + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Place.prototype.servesBeer = null; + SearchTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textQuery != null && Object.hasOwnProperty.call(message, "textQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textQuery); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rankPreference); + if (message.includedType != null && Object.hasOwnProperty.call(message, "includedType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.includedType); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.openNow); + if (message.minRating != null && Object.hasOwnProperty.call(message, "minRating")) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.minRating); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxResultCount); + if (message.priceLevels != null && message.priceLevels.length) { + writer.uint32(/* id 11, wireType 2 =*/90).fork(); + for (var i = 0; i < message.priceLevels.length; ++i) + writer.int32(message.priceLevels[i]); + writer.ldelim(); + } + if (message.strictTypeFiltering != null && Object.hasOwnProperty.call(message, "strictTypeFiltering")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.strictTypeFiltering); + if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) + $root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions")) + $root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; /** - * Place servesWine. - * @member {boolean|null|undefined} servesWine - * @memberof google.maps.places.v1.Place - * @instance + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Place.prototype.servesWine = null; + SearchTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Place servesBrunch. - * @member {boolean|null|undefined} servesBrunch - * @memberof google.maps.places.v1.Place - * @instance + * Decodes a SearchTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.prototype.servesBrunch = null; + SearchTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.textQuery = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.rankPreference = reader.int32(); + break; + } + case 6: { + message.includedType = reader.string(); + break; + } + case 7: { + message.openNow = reader.bool(); + break; + } + case 9: { + message.minRating = reader.double(); + break; + } + case 10: { + message.maxResultCount = reader.int32(); + break; + } + case 11: { + if (!(message.priceLevels && message.priceLevels.length)) + message.priceLevels = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.priceLevels.push(reader.int32()); + } else + message.priceLevels.push(reader.int32()); + break; + } + case 12: { + message.strictTypeFiltering = reader.bool(); + break; + } + case 13: { + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.decode(reader, reader.uint32()); + break; + } + case 14: { + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 15: { + message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Place servesVegetarianFood. - * @member {boolean|null|undefined} servesVegetarianFood - * @memberof google.maps.places.v1.Place - * @instance + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.prototype.servesVegetarianFood = null; + SearchTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Place currentOpeningHours. - * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} currentOpeningHours - * @memberof google.maps.places.v1.Place - * @instance + * Verifies a SearchTextRequest message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Place.prototype.currentOpeningHours = null; + SearchTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + if (!$util.isString(message.textQuery)) + return "textQuery: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + switch (message.rankPreference) { + default: + return "rankPreference: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.includedType != null && message.hasOwnProperty("includedType")) + if (!$util.isString(message.includedType)) + return "includedType: string expected"; + if (message.openNow != null && message.hasOwnProperty("openNow")) + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; + if (message.minRating != null && message.hasOwnProperty("minRating")) + if (typeof message.minRating !== "number") + return "minRating: number expected"; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + if (message.priceLevels != null && message.hasOwnProperty("priceLevels")) { + if (!Array.isArray(message.priceLevels)) + return "priceLevels: array expected"; + for (var i = 0; i < message.priceLevels.length; ++i) + switch (message.priceLevels[i]) { + default: + return "priceLevels: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + if (typeof message.strictTypeFiltering !== "boolean") + return "strictTypeFiltering: boolean expected"; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationBias.verify(message.locationBias); + if (error) + return "locationBias." + error; + } + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + if (message.evOptions != null && message.hasOwnProperty("evOptions")) { + var error = $root.google.maps.places.v1.SearchTextRequest.EVOptions.verify(message.evOptions); + if (error) + return "evOptions." + error; + } + return null; + }; /** - * Place currentSecondaryOpeningHours. - * @member {Array.} currentSecondaryOpeningHours - * @memberof google.maps.places.v1.Place - * @instance + * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest */ - Place.prototype.currentSecondaryOpeningHours = $util.emptyArray; - - /** - * Place regularSecondaryOpeningHours. - * @member {Array.} regularSecondaryOpeningHours - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.regularSecondaryOpeningHours = $util.emptyArray; - - /** - * Place editorialSummary. - * @member {google.type.ILocalizedText|null|undefined} editorialSummary - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.editorialSummary = null; - - /** - * Place outdoorSeating. - * @member {boolean|null|undefined} outdoorSeating - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.outdoorSeating = null; + SearchTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest(); + if (object.textQuery != null) + message.textQuery = String(object.textQuery); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + switch (object.rankPreference) { + default: + if (typeof object.rankPreference === "number") { + message.rankPreference = object.rankPreference; + break; + } + break; + case "RANK_PREFERENCE_UNSPECIFIED": + case 0: + message.rankPreference = 0; + break; + case "DISTANCE": + case 1: + message.rankPreference = 1; + break; + case "RELEVANCE": + case 2: + message.rankPreference = 2; + break; + } + if (object.includedType != null) + message.includedType = String(object.includedType); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.minRating != null) + message.minRating = Number(object.minRating); + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + if (object.priceLevels) { + if (!Array.isArray(object.priceLevels)) + throw TypeError(".google.maps.places.v1.SearchTextRequest.priceLevels: array expected"); + message.priceLevels = []; + for (var i = 0; i < object.priceLevels.length; ++i) + switch (object.priceLevels[i]) { + default: + if (typeof object.priceLevels[i] === "number") { + message.priceLevels[i] = object.priceLevels[i]; + break; + } + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevels[i] = 0; + break; + case "PRICE_LEVEL_FREE": + case 1: + message.priceLevels[i] = 1; + break; + case "PRICE_LEVEL_INEXPENSIVE": + case 2: + message.priceLevels[i] = 2; + break; + case "PRICE_LEVEL_MODERATE": + case 3: + message.priceLevels[i] = 3; + break; + case "PRICE_LEVEL_EXPENSIVE": + case 4: + message.priceLevels[i] = 4; + break; + case "PRICE_LEVEL_VERY_EXPENSIVE": + case 5: + message.priceLevels[i] = 5; + break; + } + } + if (object.strictTypeFiltering != null) + message.strictTypeFiltering = Boolean(object.strictTypeFiltering); + if (object.locationBias != null) { + if (typeof object.locationBias !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationBias: object expected"); + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.fromObject(object.locationBias); + } + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction); + } + if (object.evOptions != null) { + if (typeof object.evOptions !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected"); + message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions); + } + return message; + }; /** - * Place liveMusic. - * @member {boolean|null|undefined} liveMusic - * @memberof google.maps.places.v1.Place - * @instance + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.SearchTextRequest} message SearchTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Place.prototype.liveMusic = null; + SearchTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.priceLevels = []; + if (options.defaults) { + object.textQuery = ""; + object.languageCode = ""; + object.regionCode = ""; + object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; + object.includedType = ""; + object.openNow = false; + object.minRating = 0; + object.maxResultCount = 0; + object.strictTypeFiltering = false; + object.locationBias = null; + object.locationRestriction = null; + object.evOptions = null; + } + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + object.textQuery = message.textQuery; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] : message.rankPreference; + if (message.includedType != null && message.hasOwnProperty("includedType")) + object.includedType = message.includedType; + if (message.openNow != null && message.hasOwnProperty("openNow")) + object.openNow = message.openNow; + if (message.minRating != null && message.hasOwnProperty("minRating")) + object.minRating = options.json && !isFinite(message.minRating) ? String(message.minRating) : message.minRating; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + if (message.priceLevels && message.priceLevels.length) { + object.priceLevels = []; + for (var j = 0; j < message.priceLevels.length; ++j) + object.priceLevels[j] = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] === undefined ? message.priceLevels[j] : $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] : message.priceLevels[j]; + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + object.strictTypeFiltering = message.strictTypeFiltering; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) + object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options); + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.evOptions != null && message.hasOwnProperty("evOptions")) + object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options); + return object; + }; /** - * Place menuForChildren. - * @member {boolean|null|undefined} menuForChildren - * @memberof google.maps.places.v1.Place + * Converts this SearchTextRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest * @instance + * @returns {Object.} JSON object */ - Place.prototype.menuForChildren = null; + SearchTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Place servesCocktails. - * @member {boolean|null|undefined} servesCocktails - * @memberof google.maps.places.v1.Place - * @instance + * Gets the default type url for SearchTextRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Place.prototype.servesCocktails = null; + SearchTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest"; + }; /** - * Place servesDessert. - * @member {boolean|null|undefined} servesDessert - * @memberof google.maps.places.v1.Place - * @instance + * RankPreference enum. + * @name google.maps.places.v1.SearchTextRequest.RankPreference + * @enum {number} + * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value + * @property {number} DISTANCE=1 DISTANCE value + * @property {number} RELEVANCE=2 RELEVANCE value */ - Place.prototype.servesDessert = null; + SearchTextRequest.RankPreference = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISTANCE"] = 1; + values[valuesById[2] = "RELEVANCE"] = 2; + return values; + })(); - /** - * Place servesCoffee. - * @member {boolean|null|undefined} servesCoffee - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.servesCoffee = null; + SearchTextRequest.LocationBias = (function() { - /** - * Place goodForChildren. - * @member {boolean|null|undefined} goodForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForChildren = null; + /** + * Properties of a LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationBias + * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle + */ - /** - * Place allowsDogs. - * @member {boolean|null|undefined} allowsDogs - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.allowsDogs = null; + /** + * Constructs a new LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationBias. + * @implements ILocationBias + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + */ + function LocationBias(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Place restroom. - * @member {boolean|null|undefined} restroom - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.restroom = null; + /** + * LocationBias rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.rectangle = null; - /** - * Place goodForGroups. - * @member {boolean|null|undefined} goodForGroups - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForGroups = null; + /** + * LocationBias circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.circle = null; - /** - * Place goodForWatchingSports. - * @member {boolean|null|undefined} goodForWatchingSports - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.goodForWatchingSports = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Place paymentOptions. - * @member {google.maps.places.v1.Place.IPaymentOptions|null|undefined} paymentOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.paymentOptions = null; + /** + * LocationBias type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + Object.defineProperty(LocationBias.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Place parkingOptions. - * @member {google.maps.places.v1.Place.IParkingOptions|null|undefined} parkingOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.parkingOptions = null; + /** + * Creates a new LocationBias instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias instance + */ + LocationBias.create = function create(properties) { + return new LocationBias(properties); + }; - /** - * Place subDestinations. - * @member {Array.} subDestinations - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.subDestinations = $util.emptyArray; + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Place accessibilityOptions. - * @member {google.maps.places.v1.Place.IAccessibilityOptions|null|undefined} accessibilityOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.accessibilityOptions = null; + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Place fuelOptions. - * @member {google.maps.places.v1.IFuelOptions|null|undefined} fuelOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.fuelOptions = null; + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Place evChargeOptions. - * @member {google.maps.places.v1.IEVChargeOptions|null|undefined} evChargeOptions - * @memberof google.maps.places.v1.Place - * @instance - */ - Place.prototype.evChargeOptions = null; + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Verifies a LocationBias message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationBias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; - /** - * Place _utcOffsetMinutes. - * @member {"utcOffsetMinutes"|undefined} _utcOffsetMinutes - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_utcOffsetMinutes", { - get: $util.oneOfGetter($oneOfFields = ["utcOffsetMinutes"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + */ + LocationBias.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationBias) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; - /** - * Place _userRatingCount. - * @member {"userRatingCount"|undefined} _userRatingCount - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_userRatingCount", { - get: $util.oneOfGetter($oneOfFields = ["userRatingCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Place _takeout. - * @member {"takeout"|undefined} _takeout - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_takeout", { - get: $util.oneOfGetter($oneOfFields = ["takeout"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationBias} message LocationBias + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationBias.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; - /** - * Place _delivery. - * @member {"delivery"|undefined} _delivery - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_delivery", { - get: $util.oneOfGetter($oneOfFields = ["delivery"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this LocationBias to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + * @returns {Object.} JSON object + */ + LocationBias.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Place _dineIn. - * @member {"dineIn"|undefined} _dineIn - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_dineIn", { - get: $util.oneOfGetter($oneOfFields = ["dineIn"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Gets the default type url for LocationBias + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationBias"; + }; - /** - * Place _curbsidePickup. - * @member {"curbsidePickup"|undefined} _curbsidePickup - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_curbsidePickup", { - get: $util.oneOfGetter($oneOfFields = ["curbsidePickup"]), - set: $util.oneOfSetter($oneOfFields) - }); + return LocationBias; + })(); - /** - * Place _reservable. - * @member {"reservable"|undefined} _reservable - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_reservable", { - get: $util.oneOfGetter($oneOfFields = ["reservable"]), - set: $util.oneOfSetter($oneOfFields) - }); + SearchTextRequest.LocationRestriction = (function() { - /** - * Place _servesBreakfast. - * @member {"servesBreakfast"|undefined} _servesBreakfast - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBreakfast", { - get: $util.oneOfGetter($oneOfFields = ["servesBreakfast"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationRestriction + * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle + */ - /** - * Place _servesLunch. - * @member {"servesLunch"|undefined} _servesLunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesLunch", { - get: $util.oneOfGetter($oneOfFields = ["servesLunch"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Place _servesDinner. - * @member {"servesDinner"|undefined} _servesDinner - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesDinner", { - get: $util.oneOfGetter($oneOfFields = ["servesDinner"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * LocationRestriction rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.rectangle = null; - /** - * Place _servesBeer. - * @member {"servesBeer"|undefined} _servesBeer - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBeer", { - get: $util.oneOfGetter($oneOfFields = ["servesBeer"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Place _servesWine. - * @member {"servesWine"|undefined} _servesWine - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesWine", { - get: $util.oneOfGetter($oneOfFields = ["servesWine"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * LocationRestriction type. + * @member {"rectangle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Place _servesBrunch. - * @member {"servesBrunch"|undefined} _servesBrunch - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesBrunch", { - get: $util.oneOfGetter($oneOfFields = ["servesBrunch"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; - /** - * Place _servesVegetarianFood. - * @member {"servesVegetarianFood"|undefined} _servesVegetarianFood - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesVegetarianFood", { - get: $util.oneOfGetter($oneOfFields = ["servesVegetarianFood"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Place _outdoorSeating. - * @member {"outdoorSeating"|undefined} _outdoorSeating - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_outdoorSeating", { - get: $util.oneOfGetter($oneOfFields = ["outdoorSeating"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Place _liveMusic. - * @member {"liveMusic"|undefined} _liveMusic - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_liveMusic", { - get: $util.oneOfGetter($oneOfFields = ["liveMusic"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Place _menuForChildren. - * @member {"menuForChildren"|undefined} _menuForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_menuForChildren", { - get: $util.oneOfGetter($oneOfFields = ["menuForChildren"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Place _servesCocktails. - * @member {"servesCocktails"|undefined} _servesCocktails - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesCocktails", { - get: $util.oneOfGetter($oneOfFields = ["servesCocktails"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + return null; + }; - /** - * Place _servesDessert. - * @member {"servesDessert"|undefined} _servesDessert - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesDessert", { - get: $util.oneOfGetter($oneOfFields = ["servesDessert"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationRestriction.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + return message; + }; - /** - * Place _servesCoffee. - * @member {"servesCoffee"|undefined} _servesCoffee - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_servesCoffee", { - get: $util.oneOfGetter($oneOfFields = ["servesCoffee"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + return object; + }; - /** - * Place _goodForChildren. - * @member {"goodForChildren"|undefined} _goodForChildren - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForChildren", { - get: $util.oneOfGetter($oneOfFields = ["goodForChildren"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Place _allowsDogs. - * @member {"allowsDogs"|undefined} _allowsDogs - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_allowsDogs", { - get: $util.oneOfGetter($oneOfFields = ["allowsDogs"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationRestriction"; + }; - /** - * Place _restroom. - * @member {"restroom"|undefined} _restroom - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_restroom", { - get: $util.oneOfGetter($oneOfFields = ["restroom"]), - set: $util.oneOfSetter($oneOfFields) - }); + return LocationRestriction; + })(); - /** - * Place _goodForGroups. - * @member {"goodForGroups"|undefined} _goodForGroups - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForGroups", { - get: $util.oneOfGetter($oneOfFields = ["goodForGroups"]), - set: $util.oneOfSetter($oneOfFields) - }); + SearchTextRequest.EVOptions = (function() { - /** - * Place _goodForWatchingSports. - * @member {"goodForWatchingSports"|undefined} _goodForWatchingSports - * @memberof google.maps.places.v1.Place - * @instance - */ - Object.defineProperty(Place.prototype, "_goodForWatchingSports", { - get: $util.oneOfGetter($oneOfFields = ["goodForWatchingSports"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a EVOptions. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface IEVOptions + * @property {number|null} [minimumChargingRateKw] EVOptions minimumChargingRateKw + * @property {Array.|null} [connectorTypes] EVOptions connectorTypes + */ - /** - * Place _accessibilityOptions. - * @member {"accessibilityOptions"|undefined} _accessibilityOptions - * @memberof google.maps.places.v1.Place + /** + * Constructs a new EVOptions. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a EVOptions. + * @implements IEVOptions + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set + */ + function EVOptions(properties) { + this.connectorTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EVOptions minimumChargingRateKw. + * @member {number} minimumChargingRateKw + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + */ + EVOptions.prototype.minimumChargingRateKw = 0; + + /** + * EVOptions connectorTypes. + * @member {Array.} connectorTypes + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + */ + EVOptions.prototype.connectorTypes = $util.emptyArray; + + /** + * Creates a new EVOptions instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions instance + */ + EVOptions.create = function create(properties) { + return new EVOptions(properties); + }; + + /** + * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimumChargingRateKw != null && Object.hasOwnProperty.call(message, "minimumChargingRateKw")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimumChargingRateKw); + if (message.connectorTypes != null && message.connectorTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.connectorTypes.length; ++i) + writer.int32(message.connectorTypes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EVOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a EVOptions message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimumChargingRateKw = reader.double(); + break; + } + case 2: { + if (!(message.connectorTypes && message.connectorTypes.length)) + message.connectorTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.connectorTypes.push(reader.int32()); + } else + message.connectorTypes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a EVOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EVOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a EVOptions message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EVOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) + if (typeof message.minimumChargingRateKw !== "number") + return "minimumChargingRateKw: number expected"; + if (message.connectorTypes != null && message.hasOwnProperty("connectorTypes")) { + if (!Array.isArray(message.connectorTypes)) + return "connectorTypes: array expected"; + for (var i = 0; i < message.connectorTypes.length; ++i) + switch (message.connectorTypes[i]) { + default: + return "connectorTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + return null; + }; + + /** + * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions + */ + EVOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.EVOptions) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); + if (object.minimumChargingRateKw != null) + message.minimumChargingRateKw = Number(object.minimumChargingRateKw); + if (object.connectorTypes) { + if (!Array.isArray(object.connectorTypes)) + throw TypeError(".google.maps.places.v1.SearchTextRequest.EVOptions.connectorTypes: array expected"); + message.connectorTypes = []; + for (var i = 0; i < object.connectorTypes.length; ++i) + switch (object.connectorTypes[i]) { + default: + if (typeof object.connectorTypes[i] === "number") { + message.connectorTypes[i] = object.connectorTypes[i]; + break; + } + case "EV_CONNECTOR_TYPE_UNSPECIFIED": + case 0: + message.connectorTypes[i] = 0; + break; + case "EV_CONNECTOR_TYPE_OTHER": + case 1: + message.connectorTypes[i] = 1; + break; + case "EV_CONNECTOR_TYPE_J1772": + case 2: + message.connectorTypes[i] = 2; + break; + case "EV_CONNECTOR_TYPE_TYPE_2": + case 3: + message.connectorTypes[i] = 3; + break; + case "EV_CONNECTOR_TYPE_CHADEMO": + case 4: + message.connectorTypes[i] = 4; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_1": + case 5: + message.connectorTypes[i] = 5; + break; + case "EV_CONNECTOR_TYPE_CCS_COMBO_2": + case 6: + message.connectorTypes[i] = 6; + break; + case "EV_CONNECTOR_TYPE_TESLA": + case 7: + message.connectorTypes[i] = 7; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": + case 8: + message.connectorTypes[i] = 8; + break; + case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": + case 9: + message.connectorTypes[i] = 9; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a EVOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {google.maps.places.v1.SearchTextRequest.EVOptions} message EVOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EVOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectorTypes = []; + if (options.defaults) + object.minimumChargingRateKw = 0; + if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) + object.minimumChargingRateKw = options.json && !isFinite(message.minimumChargingRateKw) ? String(message.minimumChargingRateKw) : message.minimumChargingRateKw; + if (message.connectorTypes && message.connectorTypes.length) { + object.connectorTypes = []; + for (var j = 0; j < message.connectorTypes.length; ++j) + object.connectorTypes[j] = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] === undefined ? message.connectorTypes[j] : $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] : message.connectorTypes[j]; + } + return object; + }; + + /** + * Converts this EVOptions to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @instance + * @returns {Object.} JSON object + */ + EVOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EVOptions + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.EVOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.EVOptions"; + }; + + return EVOptions; + })(); + + return SearchTextRequest; + })(); + + v1.SearchTextResponse = (function() { + + /** + * Properties of a SearchTextResponse. + * @memberof google.maps.places.v1 + * @interface ISearchTextResponse + * @property {Array.|null} [places] SearchTextResponse places + * @property {Array.|null} [contextualContents] SearchTextResponse contextualContents + */ + + /** + * Constructs a new SearchTextResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextResponse. + * @implements ISearchTextResponse + * @constructor + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + */ + function SearchTextResponse(properties) { + this.places = []; + this.contextualContents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchTextResponse places. + * @member {Array.} places + * @memberof google.maps.places.v1.SearchTextResponse * @instance */ - Object.defineProperty(Place.prototype, "_accessibilityOptions", { - get: $util.oneOfGetter($oneOfFields = ["accessibilityOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); + SearchTextResponse.prototype.places = $util.emptyArray; /** - * Creates a new Place instance using the specified properties. + * SearchTextResponse contextualContents. + * @member {Array.} contextualContents + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + */ + SearchTextResponse.prototype.contextualContents = $util.emptyArray; + + /** + * Creates a new SearchTextResponse instance using the specified properties. * @function create - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static - * @param {google.maps.places.v1.IPlace=} [properties] Properties to set - * @returns {google.maps.places.v1.Place} Place instance + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse instance */ - Place.create = function create(properties) { - return new Place(properties); + SearchTextResponse.create = function create(properties) { + return new SearchTextResponse(properties); }; /** - * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. * @function encode - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static - * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Place.encode = function encode(message, writer) { + SearchTextResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); - if (message.nationalPhoneNumber != null && Object.hasOwnProperty.call(message, "nationalPhoneNumber")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.nationalPhoneNumber); - if (message.internationalPhoneNumber != null && Object.hasOwnProperty.call(message, "internationalPhoneNumber")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.internationalPhoneNumber); - if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.formattedAddress); - if (message.addressComponents != null && message.addressComponents.length) - for (var i = 0; i < message.addressComponents.length; ++i) - $root.google.maps.places.v1.Place.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode")) - $root.google.maps.places.v1.Place.PlusCode.encode(message.plusCode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.viewport != null && Object.hasOwnProperty.call(message, "viewport")) - $root.google.geo.type.Viewport.encode(message.viewport, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) - writer.uint32(/* id 14, wireType 1 =*/113).double(message.rating); - if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.googleMapsUri); - if (message.websiteUri != null && Object.hasOwnProperty.call(message, "websiteUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.websiteUri); - if (message.regularOpeningHours != null && Object.hasOwnProperty.call(message, "regularOpeningHours")) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularOpeningHours, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.utcOffsetMinutes != null && Object.hasOwnProperty.call(message, "utcOffsetMinutes")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.utcOffsetMinutes); - if (message.adrFormatAddress != null && Object.hasOwnProperty.call(message, "adrFormatAddress")) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.adrFormatAddress); - if (message.businessStatus != null && Object.hasOwnProperty.call(message, "businessStatus")) - writer.uint32(/* id 25, wireType 0 =*/200).int32(message.businessStatus); - if (message.priceLevel != null && Object.hasOwnProperty.call(message, "priceLevel")) - writer.uint32(/* id 26, wireType 0 =*/208).int32(message.priceLevel); - if (message.attributions != null && message.attributions.length) - for (var i = 0; i < message.attributions.length; ++i) - $root.google.maps.places.v1.Place.Attribution.encode(message.attributions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.userRatingCount != null && Object.hasOwnProperty.call(message, "userRatingCount")) - writer.uint32(/* id 28, wireType 0 =*/224).int32(message.userRatingCount); - if (message.iconMaskBaseUri != null && Object.hasOwnProperty.call(message, "iconMaskBaseUri")) - writer.uint32(/* id 29, wireType 2 =*/234).string(message.iconMaskBaseUri); - if (message.iconBackgroundColor != null && Object.hasOwnProperty.call(message, "iconBackgroundColor")) - writer.uint32(/* id 30, wireType 2 =*/242).string(message.iconBackgroundColor); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - $root.google.type.LocalizedText.encode(message.displayName, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - if (message.primaryTypeDisplayName != null && Object.hasOwnProperty.call(message, "primaryTypeDisplayName")) - $root.google.type.LocalizedText.encode(message.primaryTypeDisplayName, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.takeout); - if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) - writer.uint32(/* id 34, wireType 0 =*/272).bool(message.delivery); - if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) - writer.uint32(/* id 35, wireType 0 =*/280).bool(message.dineIn); - if (message.curbsidePickup != null && Object.hasOwnProperty.call(message, "curbsidePickup")) - writer.uint32(/* id 36, wireType 0 =*/288).bool(message.curbsidePickup); - if (message.reservable != null && Object.hasOwnProperty.call(message, "reservable")) - writer.uint32(/* id 38, wireType 0 =*/304).bool(message.reservable); - if (message.servesBreakfast != null && Object.hasOwnProperty.call(message, "servesBreakfast")) - writer.uint32(/* id 39, wireType 0 =*/312).bool(message.servesBreakfast); - if (message.servesLunch != null && Object.hasOwnProperty.call(message, "servesLunch")) - writer.uint32(/* id 40, wireType 0 =*/320).bool(message.servesLunch); - if (message.servesDinner != null && Object.hasOwnProperty.call(message, "servesDinner")) - writer.uint32(/* id 41, wireType 0 =*/328).bool(message.servesDinner); - if (message.servesBeer != null && Object.hasOwnProperty.call(message, "servesBeer")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.servesBeer); - if (message.servesWine != null && Object.hasOwnProperty.call(message, "servesWine")) - writer.uint32(/* id 43, wireType 0 =*/344).bool(message.servesWine); - if (message.servesBrunch != null && Object.hasOwnProperty.call(message, "servesBrunch")) - writer.uint32(/* id 44, wireType 0 =*/352).bool(message.servesBrunch); - if (message.servesVegetarianFood != null && Object.hasOwnProperty.call(message, "servesVegetarianFood")) - writer.uint32(/* id 45, wireType 0 =*/360).bool(message.servesVegetarianFood); - if (message.currentOpeningHours != null && Object.hasOwnProperty.call(message, "currentOpeningHours")) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentOpeningHours, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); - if (message.currentSecondaryOpeningHours != null && message.currentSecondaryOpeningHours.length) - for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentSecondaryOpeningHours[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.regularSecondaryOpeningHours != null && message.regularSecondaryOpeningHours.length) - for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.encode(message.regularSecondaryOpeningHours[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.primaryType != null && Object.hasOwnProperty.call(message, "primaryType")) - writer.uint32(/* id 50, wireType 2 =*/402).string(message.primaryType); - if (message.shortFormattedAddress != null && Object.hasOwnProperty.call(message, "shortFormattedAddress")) - writer.uint32(/* id 51, wireType 2 =*/410).string(message.shortFormattedAddress); - if (message.editorialSummary != null && Object.hasOwnProperty.call(message, "editorialSummary")) - $root.google.type.LocalizedText.encode(message.editorialSummary, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.reviews != null && message.reviews.length) - for (var i = 0; i < message.reviews.length; ++i) - $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); - if (message.photos != null && message.photos.length) - for (var i = 0; i < message.photos.length; ++i) - $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); - if (message.outdoorSeating != null && Object.hasOwnProperty.call(message, "outdoorSeating")) - writer.uint32(/* id 55, wireType 0 =*/440).bool(message.outdoorSeating); - if (message.liveMusic != null && Object.hasOwnProperty.call(message, "liveMusic")) - writer.uint32(/* id 56, wireType 0 =*/448).bool(message.liveMusic); - if (message.menuForChildren != null && Object.hasOwnProperty.call(message, "menuForChildren")) - writer.uint32(/* id 57, wireType 0 =*/456).bool(message.menuForChildren); - if (message.servesCocktails != null && Object.hasOwnProperty.call(message, "servesCocktails")) - writer.uint32(/* id 58, wireType 0 =*/464).bool(message.servesCocktails); - if (message.servesDessert != null && Object.hasOwnProperty.call(message, "servesDessert")) - writer.uint32(/* id 59, wireType 0 =*/472).bool(message.servesDessert); - if (message.servesCoffee != null && Object.hasOwnProperty.call(message, "servesCoffee")) - writer.uint32(/* id 60, wireType 0 =*/480).bool(message.servesCoffee); - if (message.goodForChildren != null && Object.hasOwnProperty.call(message, "goodForChildren")) - writer.uint32(/* id 62, wireType 0 =*/496).bool(message.goodForChildren); - if (message.allowsDogs != null && Object.hasOwnProperty.call(message, "allowsDogs")) - writer.uint32(/* id 63, wireType 0 =*/504).bool(message.allowsDogs); - if (message.restroom != null && Object.hasOwnProperty.call(message, "restroom")) - writer.uint32(/* id 64, wireType 0 =*/512).bool(message.restroom); - if (message.goodForGroups != null && Object.hasOwnProperty.call(message, "goodForGroups")) - writer.uint32(/* id 65, wireType 0 =*/520).bool(message.goodForGroups); - if (message.goodForWatchingSports != null && Object.hasOwnProperty.call(message, "goodForWatchingSports")) - writer.uint32(/* id 66, wireType 0 =*/528).bool(message.goodForWatchingSports); - if (message.paymentOptions != null && Object.hasOwnProperty.call(message, "paymentOptions")) - $root.google.maps.places.v1.Place.PaymentOptions.encode(message.paymentOptions, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); - if (message.parkingOptions != null && Object.hasOwnProperty.call(message, "parkingOptions")) - $root.google.maps.places.v1.Place.ParkingOptions.encode(message.parkingOptions, writer.uint32(/* id 70, wireType 2 =*/562).fork()).ldelim(); - if (message.subDestinations != null && message.subDestinations.length) - for (var i = 0; i < message.subDestinations.length; ++i) - $root.google.maps.places.v1.Place.SubDestination.encode(message.subDestinations[i], writer.uint32(/* id 71, wireType 2 =*/570).fork()).ldelim(); - if (message.accessibilityOptions != null && Object.hasOwnProperty.call(message, "accessibilityOptions")) - $root.google.maps.places.v1.Place.AccessibilityOptions.encode(message.accessibilityOptions, writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); - if (message.fuelOptions != null && Object.hasOwnProperty.call(message, "fuelOptions")) - $root.google.maps.places.v1.FuelOptions.encode(message.fuelOptions, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); - if (message.evChargeOptions != null && Object.hasOwnProperty.call(message, "evChargeOptions")) - $root.google.maps.places.v1.EVChargeOptions.encode(message.evChargeOptions, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contextualContents != null && message.contextualContents.length) + for (var i = 0; i < message.contextualContents.length; ++i) + $root.google.maps.places.v1.ContextualContent.encode(message.contextualContents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static - * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Place.encodeDelimited = function encodeDelimited(message, writer) { + SearchTextResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Place message from the specified reader or buffer. + * Decodes a SearchTextResponse message from the specified reader or buffer. * @function decode - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place} Place + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.decode = function decode(reader, length) { + SearchTextResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.id = reader.string(); - break; - } - case 31: { - message.displayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 50: { - message.primaryType = reader.string(); - break; - } - case 32: { - message.primaryTypeDisplayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 7: { - message.nationalPhoneNumber = reader.string(); - break; - } - case 8: { - message.internationalPhoneNumber = reader.string(); - break; - } - case 9: { - message.formattedAddress = reader.string(); - break; - } - case 51: { - message.shortFormattedAddress = reader.string(); - break; - } - case 10: { - if (!(message.addressComponents && message.addressComponents.length)) - message.addressComponents = []; - message.addressComponents.push($root.google.maps.places.v1.Place.AddressComponent.decode(reader, reader.uint32())); - break; - } - case 11: { - message.plusCode = $root.google.maps.places.v1.Place.PlusCode.decode(reader, reader.uint32()); - break; - } - case 12: { - message.location = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 13: { - message.viewport = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 14: { - message.rating = reader.double(); - break; - } - case 15: { - message.googleMapsUri = reader.string(); - break; - } - case 16: { - message.websiteUri = reader.string(); - break; - } - case 53: { - if (!(message.reviews && message.reviews.length)) - message.reviews = []; - message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32())); - break; - } - case 21: { - message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); - break; - } - case 22: { - message.utcOffsetMinutes = reader.int32(); - break; - } - case 54: { - if (!(message.photos && message.photos.length)) - message.photos = []; - message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32())); - break; - } - case 24: { - message.adrFormatAddress = reader.string(); - break; - } - case 25: { - message.businessStatus = reader.int32(); - break; - } - case 26: { - message.priceLevel = reader.int32(); - break; - } - case 27: { - if (!(message.attributions && message.attributions.length)) - message.attributions = []; - message.attributions.push($root.google.maps.places.v1.Place.Attribution.decode(reader, reader.uint32())); - break; - } - case 28: { - message.userRatingCount = reader.int32(); - break; - } - case 29: { - message.iconMaskBaseUri = reader.string(); - break; - } - case 30: { - message.iconBackgroundColor = reader.string(); - break; - } - case 33: { - message.takeout = reader.bool(); - break; - } - case 34: { - message.delivery = reader.bool(); - break; - } - case 35: { - message.dineIn = reader.bool(); - break; - } - case 36: { - message.curbsidePickup = reader.bool(); - break; - } - case 38: { - message.reservable = reader.bool(); - break; - } - case 39: { - message.servesBreakfast = reader.bool(); - break; - } - case 40: { - message.servesLunch = reader.bool(); - break; - } - case 41: { - message.servesDinner = reader.bool(); - break; - } - case 42: { - message.servesBeer = reader.bool(); - break; - } - case 43: { - message.servesWine = reader.bool(); - break; - } - case 44: { - message.servesBrunch = reader.bool(); - break; - } - case 45: { - message.servesVegetarianFood = reader.bool(); - break; - } - case 46: { - message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); - break; - } - case 47: { - if (!(message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length)) - message.currentSecondaryOpeningHours = []; - message.currentSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); - break; - } - case 49: { - if (!(message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length)) - message.regularSecondaryOpeningHours = []; - message.regularSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); - break; - } - case 52: { - message.editorialSummary = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 55: { - message.outdoorSeating = reader.bool(); - break; - } - case 56: { - message.liveMusic = reader.bool(); - break; - } - case 57: { - message.menuForChildren = reader.bool(); - break; - } - case 58: { - message.servesCocktails = reader.bool(); - break; - } - case 59: { - message.servesDessert = reader.bool(); - break; - } - case 60: { - message.servesCoffee = reader.bool(); - break; - } - case 62: { - message.goodForChildren = reader.bool(); - break; - } - case 63: { - message.allowsDogs = reader.bool(); - break; - } - case 64: { - message.restroom = reader.bool(); - break; - } - case 65: { - message.goodForGroups = reader.bool(); - break; - } - case 66: { - message.goodForWatchingSports = reader.bool(); - break; - } - case 67: { - message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.decode(reader, reader.uint32()); - break; - } - case 70: { - message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.decode(reader, reader.uint32()); - break; - } - case 71: { - if (!(message.subDestinations && message.subDestinations.length)) - message.subDestinations = []; - message.subDestinations.push($root.google.maps.places.v1.Place.SubDestination.decode(reader, reader.uint32())); - break; - } - case 72: { - message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.decode(reader, reader.uint32()); - break; - } - case 78: { - message.fuelOptions = $root.google.maps.places.v1.FuelOptions.decode(reader, reader.uint32()); + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); break; } - case 79: { - message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.decode(reader, reader.uint32()); + case 3: { + if (!(message.contextualContents && message.contextualContents.length)) + message.contextualContents = []; + message.contextualContents.push($root.google.maps.places.v1.ContextualContent.decode(reader, reader.uint32())); break; } default: @@ -17223,11140 +14752,15519 @@ }; /** - * Decodes a Place message from the specified reader or buffer, length delimited. + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place} Place + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Place.decodeDelimited = function decodeDelimited(reader) { + SearchTextResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Place message. + * Verifies a SearchTextResponse message. * @function verify - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.SearchTextResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Place.verify = function verify(message) { + SearchTextResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) { - var error = $root.google.type.LocalizedText.verify(message.displayName); - if (error) - return "displayName." + error; - } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.primaryType != null && message.hasOwnProperty("primaryType")) - if (!$util.isString(message.primaryType)) - return "primaryType: string expected"; - if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) { - var error = $root.google.type.LocalizedText.verify(message.primaryTypeDisplayName); - if (error) - return "primaryTypeDisplayName." + error; - } - if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) - if (!$util.isString(message.nationalPhoneNumber)) - return "nationalPhoneNumber: string expected"; - if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) - if (!$util.isString(message.internationalPhoneNumber)) - return "internationalPhoneNumber: string expected"; - if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) - if (!$util.isString(message.formattedAddress)) - return "formattedAddress: string expected"; - if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) - if (!$util.isString(message.shortFormattedAddress)) - return "shortFormattedAddress: string expected"; - if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) { - if (!Array.isArray(message.addressComponents)) - return "addressComponents: array expected"; - for (var i = 0; i < message.addressComponents.length; ++i) { - var error = $root.google.maps.places.v1.Place.AddressComponent.verify(message.addressComponents[i]); + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) { + var error = $root.google.maps.places.v1.Place.verify(message.places[i]); if (error) - return "addressComponents." + error; + return "places." + error; } } - if (message.plusCode != null && message.hasOwnProperty("plusCode")) { - var error = $root.google.maps.places.v1.Place.PlusCode.verify(message.plusCode); - if (error) - return "plusCode." + error; - } - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.type.LatLng.verify(message.location); - if (error) - return "location." + error; - } - if (message.viewport != null && message.hasOwnProperty("viewport")) { - var error = $root.google.geo.type.Viewport.verify(message.viewport); - if (error) - return "viewport." + error; - } - if (message.rating != null && message.hasOwnProperty("rating")) - if (typeof message.rating !== "number") - return "rating: number expected"; - if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) - if (!$util.isString(message.googleMapsUri)) - return "googleMapsUri: string expected"; - if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) - if (!$util.isString(message.websiteUri)) - return "websiteUri: string expected"; - if (message.reviews != null && message.hasOwnProperty("reviews")) { - if (!Array.isArray(message.reviews)) - return "reviews: array expected"; - for (var i = 0; i < message.reviews.length; ++i) { - var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]); + if (message.contextualContents != null && message.hasOwnProperty("contextualContents")) { + if (!Array.isArray(message.contextualContents)) + return "contextualContents: array expected"; + for (var i = 0; i < message.contextualContents.length; ++i) { + var error = $root.google.maps.places.v1.ContextualContent.verify(message.contextualContents[i]); if (error) - return "reviews." + error; + return "contextualContents." + error; } } - if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularOpeningHours); - if (error) - return "regularOpeningHours." + error; - } - if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { - properties._utcOffsetMinutes = 1; - if (!$util.isInteger(message.utcOffsetMinutes)) - return "utcOffsetMinutes: integer expected"; - } - if (message.photos != null && message.hasOwnProperty("photos")) { - if (!Array.isArray(message.photos)) - return "photos: array expected"; - for (var i = 0; i < message.photos.length; ++i) { - var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]); - if (error) - return "photos." + error; + return null; + }; + + /** + * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + */ + SearchTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextResponse) + return object; + var message = new $root.google.maps.places.v1.SearchTextResponse(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: object expected"); + message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); } } - if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) - if (!$util.isString(message.adrFormatAddress)) - return "adrFormatAddress: string expected"; - if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) - switch (message.businessStatus) { - default: - return "businessStatus: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) - switch (message.priceLevel) { - default: - return "priceLevel: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.attributions != null && message.hasOwnProperty("attributions")) { - if (!Array.isArray(message.attributions)) - return "attributions: array expected"; - for (var i = 0; i < message.attributions.length; ++i) { - var error = $root.google.maps.places.v1.Place.Attribution.verify(message.attributions[i]); - if (error) - return "attributions." + error; + if (object.contextualContents) { + if (!Array.isArray(object.contextualContents)) + throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: array expected"); + message.contextualContents = []; + for (var i = 0; i < object.contextualContents.length; ++i) { + if (typeof object.contextualContents[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: object expected"); + message.contextualContents[i] = $root.google.maps.places.v1.ContextualContent.fromObject(object.contextualContents[i]); } } - if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { - properties._userRatingCount = 1; - if (!$util.isInteger(message.userRatingCount)) - return "userRatingCount: integer expected"; - } - if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) - if (!$util.isString(message.iconMaskBaseUri)) - return "iconMaskBaseUri: string expected"; - if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) - if (!$util.isString(message.iconBackgroundColor)) - return "iconBackgroundColor: string expected"; - if (message.takeout != null && message.hasOwnProperty("takeout")) { - properties._takeout = 1; - if (typeof message.takeout !== "boolean") - return "takeout: boolean expected"; - } - if (message.delivery != null && message.hasOwnProperty("delivery")) { - properties._delivery = 1; - if (typeof message.delivery !== "boolean") - return "delivery: boolean expected"; - } - if (message.dineIn != null && message.hasOwnProperty("dineIn")) { - properties._dineIn = 1; - if (typeof message.dineIn !== "boolean") - return "dineIn: boolean expected"; + return message; + }; + + /** + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.SearchTextResponse} message SearchTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.places = []; + object.contextualContents = []; } - if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { - properties._curbsidePickup = 1; - if (typeof message.curbsidePickup !== "boolean") - return "curbsidePickup: boolean expected"; + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); } - if (message.reservable != null && message.hasOwnProperty("reservable")) { - properties._reservable = 1; - if (typeof message.reservable !== "boolean") - return "reservable: boolean expected"; + if (message.contextualContents && message.contextualContents.length) { + object.contextualContents = []; + for (var j = 0; j < message.contextualContents.length; ++j) + object.contextualContents[j] = $root.google.maps.places.v1.ContextualContent.toObject(message.contextualContents[j], options); } - if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { - properties._servesBreakfast = 1; - if (typeof message.servesBreakfast !== "boolean") - return "servesBreakfast: boolean expected"; + return object; + }; + + /** + * Converts this SearchTextResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + * @returns {Object.} JSON object + */ + SearchTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchTextResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { - properties._servesLunch = 1; - if (typeof message.servesLunch !== "boolean") - return "servesLunch: boolean expected"; - } - if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { - properties._servesDinner = 1; - if (typeof message.servesDinner !== "boolean") - return "servesDinner: boolean expected"; - } - if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { - properties._servesBeer = 1; - if (typeof message.servesBeer !== "boolean") - return "servesBeer: boolean expected"; - } - if (message.servesWine != null && message.hasOwnProperty("servesWine")) { - properties._servesWine = 1; - if (typeof message.servesWine !== "boolean") - return "servesWine: boolean expected"; - } - if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { - properties._servesBrunch = 1; - if (typeof message.servesBrunch !== "boolean") - return "servesBrunch: boolean expected"; - } - if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { - properties._servesVegetarianFood = 1; - if (typeof message.servesVegetarianFood !== "boolean") - return "servesVegetarianFood: boolean expected"; - } - if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentOpeningHours); - if (error) - return "currentOpeningHours." + error; - } - if (message.currentSecondaryOpeningHours != null && message.hasOwnProperty("currentSecondaryOpeningHours")) { - if (!Array.isArray(message.currentSecondaryOpeningHours)) - return "currentSecondaryOpeningHours: array expected"; - for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentSecondaryOpeningHours[i]); - if (error) - return "currentSecondaryOpeningHours." + error; - } - } - if (message.regularSecondaryOpeningHours != null && message.hasOwnProperty("regularSecondaryOpeningHours")) { - if (!Array.isArray(message.regularSecondaryOpeningHours)) - return "regularSecondaryOpeningHours: array expected"; - for (var i = 0; i < message.regularSecondaryOpeningHours.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.regularSecondaryOpeningHours[i]); - if (error) - return "regularSecondaryOpeningHours." + error; - } - } - if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) { - var error = $root.google.type.LocalizedText.verify(message.editorialSummary); - if (error) - return "editorialSummary." + error; - } - if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { - properties._outdoorSeating = 1; - if (typeof message.outdoorSeating !== "boolean") - return "outdoorSeating: boolean expected"; - } - if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { - properties._liveMusic = 1; - if (typeof message.liveMusic !== "boolean") - return "liveMusic: boolean expected"; - } - if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { - properties._menuForChildren = 1; - if (typeof message.menuForChildren !== "boolean") - return "menuForChildren: boolean expected"; - } - if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { - properties._servesCocktails = 1; - if (typeof message.servesCocktails !== "boolean") - return "servesCocktails: boolean expected"; - } - if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { - properties._servesDessert = 1; - if (typeof message.servesDessert !== "boolean") - return "servesDessert: boolean expected"; - } - if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { - properties._servesCoffee = 1; - if (typeof message.servesCoffee !== "boolean") - return "servesCoffee: boolean expected"; - } - if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { - properties._goodForChildren = 1; - if (typeof message.goodForChildren !== "boolean") - return "goodForChildren: boolean expected"; - } - if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { - properties._allowsDogs = 1; - if (typeof message.allowsDogs !== "boolean") - return "allowsDogs: boolean expected"; - } - if (message.restroom != null && message.hasOwnProperty("restroom")) { - properties._restroom = 1; - if (typeof message.restroom !== "boolean") - return "restroom: boolean expected"; - } - if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { - properties._goodForGroups = 1; - if (typeof message.goodForGroups !== "boolean") - return "goodForGroups: boolean expected"; - } - if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { - properties._goodForWatchingSports = 1; - if (typeof message.goodForWatchingSports !== "boolean") - return "goodForWatchingSports: boolean expected"; - } - if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) { - var error = $root.google.maps.places.v1.Place.PaymentOptions.verify(message.paymentOptions); - if (error) - return "paymentOptions." + error; - } - if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) { - var error = $root.google.maps.places.v1.Place.ParkingOptions.verify(message.parkingOptions); - if (error) - return "parkingOptions." + error; - } - if (message.subDestinations != null && message.hasOwnProperty("subDestinations")) { - if (!Array.isArray(message.subDestinations)) - return "subDestinations: array expected"; - for (var i = 0; i < message.subDestinations.length; ++i) { - var error = $root.google.maps.places.v1.Place.SubDestination.verify(message.subDestinations[i]); - if (error) - return "subDestinations." + error; - } - } - if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { - properties._accessibilityOptions = 1; - { - var error = $root.google.maps.places.v1.Place.AccessibilityOptions.verify(message.accessibilityOptions); - if (error) - return "accessibilityOptions." + error; + return typeUrlPrefix + "/google.maps.places.v1.SearchTextResponse"; + }; + + return SearchTextResponse; + })(); + + v1.GetPhotoMediaRequest = (function() { + + /** + * Properties of a GetPhotoMediaRequest. + * @memberof google.maps.places.v1 + * @interface IGetPhotoMediaRequest + * @property {string|null} [name] GetPhotoMediaRequest name + * @property {number|null} [maxWidthPx] GetPhotoMediaRequest maxWidthPx + * @property {number|null} [maxHeightPx] GetPhotoMediaRequest maxHeightPx + * @property {boolean|null} [skipHttpRedirect] GetPhotoMediaRequest skipHttpRedirect + */ + + /** + * Constructs a new GetPhotoMediaRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a GetPhotoMediaRequest. + * @implements IGetPhotoMediaRequest + * @constructor + * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set + */ + function GetPhotoMediaRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPhotoMediaRequest name. + * @member {string} name + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.name = ""; + + /** + * GetPhotoMediaRequest maxWidthPx. + * @member {number} maxWidthPx + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.maxWidthPx = 0; + + /** + * GetPhotoMediaRequest maxHeightPx. + * @member {number} maxHeightPx + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.maxHeightPx = 0; + + /** + * GetPhotoMediaRequest skipHttpRedirect. + * @member {boolean} skipHttpRedirect + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + */ + GetPhotoMediaRequest.prototype.skipHttpRedirect = false; + + /** + * Creates a new GetPhotoMediaRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest instance + */ + GetPhotoMediaRequest.create = function create(properties) { + return new GetPhotoMediaRequest(properties); + }; + + /** + * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhotoMediaRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.maxWidthPx != null && Object.hasOwnProperty.call(message, "maxWidthPx")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxWidthPx); + if (message.maxHeightPx != null && Object.hasOwnProperty.call(message, "maxHeightPx")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxHeightPx); + if (message.skipHttpRedirect != null && Object.hasOwnProperty.call(message, "skipHttpRedirect")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipHttpRedirect); + return writer; + }; + + /** + * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhotoMediaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhotoMediaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.maxWidthPx = reader.int32(); + break; + } + case 3: { + message.maxHeightPx = reader.int32(); + break; + } + case 4: { + message.skipHttpRedirect = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; } } - if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) { - var error = $root.google.maps.places.v1.FuelOptions.verify(message.fuelOptions); - if (error) - return "fuelOptions." + error; - } - if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) { - var error = $root.google.maps.places.v1.EVChargeOptions.verify(message.evChargeOptions); - if (error) - return "evChargeOptions." + error; - } + return message; + }; + + /** + * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhotoMediaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPhotoMediaRequest message. + * @function verify + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPhotoMediaRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) + if (!$util.isInteger(message.maxWidthPx)) + return "maxWidthPx: integer expected"; + if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) + if (!$util.isInteger(message.maxHeightPx)) + return "maxHeightPx: integer expected"; + if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) + if (typeof message.skipHttpRedirect !== "boolean") + return "skipHttpRedirect: boolean expected"; return null; }; /** - * Creates a Place message from a plain object. Also converts values to their respective internal types. + * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.maps.places.v1.Place + * @memberof google.maps.places.v1.GetPhotoMediaRequest * @static * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place} Place + * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest */ - Place.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place) + GetPhotoMediaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.GetPhotoMediaRequest) return object; - var message = new $root.google.maps.places.v1.Place(); + var message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); if (object.name != null) message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.displayName != null) { - if (typeof object.displayName !== "object") - throw TypeError(".google.maps.places.v1.Place.displayName: object expected"); - message.displayName = $root.google.type.LocalizedText.fromObject(object.displayName); - } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.Place.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.primaryType != null) - message.primaryType = String(object.primaryType); - if (object.primaryTypeDisplayName != null) { - if (typeof object.primaryTypeDisplayName !== "object") - throw TypeError(".google.maps.places.v1.Place.primaryTypeDisplayName: object expected"); - message.primaryTypeDisplayName = $root.google.type.LocalizedText.fromObject(object.primaryTypeDisplayName); - } - if (object.nationalPhoneNumber != null) - message.nationalPhoneNumber = String(object.nationalPhoneNumber); - if (object.internationalPhoneNumber != null) - message.internationalPhoneNumber = String(object.internationalPhoneNumber); - if (object.formattedAddress != null) - message.formattedAddress = String(object.formattedAddress); - if (object.shortFormattedAddress != null) - message.shortFormattedAddress = String(object.shortFormattedAddress); - if (object.addressComponents) { - if (!Array.isArray(object.addressComponents)) - throw TypeError(".google.maps.places.v1.Place.addressComponents: array expected"); - message.addressComponents = []; - for (var i = 0; i < object.addressComponents.length; ++i) { - if (typeof object.addressComponents[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.addressComponents: object expected"); - message.addressComponents[i] = $root.google.maps.places.v1.Place.AddressComponent.fromObject(object.addressComponents[i]); - } - } - if (object.plusCode != null) { - if (typeof object.plusCode !== "object") - throw TypeError(".google.maps.places.v1.Place.plusCode: object expected"); - message.plusCode = $root.google.maps.places.v1.Place.PlusCode.fromObject(object.plusCode); - } - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.maps.places.v1.Place.location: object expected"); - message.location = $root.google.type.LatLng.fromObject(object.location); - } - if (object.viewport != null) { - if (typeof object.viewport !== "object") - throw TypeError(".google.maps.places.v1.Place.viewport: object expected"); - message.viewport = $root.google.geo.type.Viewport.fromObject(object.viewport); - } - if (object.rating != null) - message.rating = Number(object.rating); - if (object.googleMapsUri != null) - message.googleMapsUri = String(object.googleMapsUri); - if (object.websiteUri != null) - message.websiteUri = String(object.websiteUri); - if (object.reviews) { - if (!Array.isArray(object.reviews)) - throw TypeError(".google.maps.places.v1.Place.reviews: array expected"); - message.reviews = []; - for (var i = 0; i < object.reviews.length; ++i) { - if (typeof object.reviews[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.reviews: object expected"); - message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]); - } - } - if (object.regularOpeningHours != null) { - if (typeof object.regularOpeningHours !== "object") - throw TypeError(".google.maps.places.v1.Place.regularOpeningHours: object expected"); - message.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularOpeningHours); + if (object.maxWidthPx != null) + message.maxWidthPx = object.maxWidthPx | 0; + if (object.maxHeightPx != null) + message.maxHeightPx = object.maxHeightPx | 0; + if (object.skipHttpRedirect != null) + message.skipHttpRedirect = Boolean(object.skipHttpRedirect); + return message; + }; + + /** + * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {google.maps.places.v1.GetPhotoMediaRequest} message GetPhotoMediaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPhotoMediaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.maxWidthPx = 0; + object.maxHeightPx = 0; + object.skipHttpRedirect = false; } - if (object.utcOffsetMinutes != null) - message.utcOffsetMinutes = object.utcOffsetMinutes | 0; - if (object.photos) { - if (!Array.isArray(object.photos)) - throw TypeError(".google.maps.places.v1.Place.photos: array expected"); - message.photos = []; - for (var i = 0; i < object.photos.length; ++i) { - if (typeof object.photos[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.photos: object expected"); - message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]); - } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) + object.maxWidthPx = message.maxWidthPx; + if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) + object.maxHeightPx = message.maxHeightPx; + if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) + object.skipHttpRedirect = message.skipHttpRedirect; + return object; + }; + + /** + * Converts this GetPhotoMediaRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @instance + * @returns {Object.} JSON object + */ + GetPhotoMediaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPhotoMediaRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.GetPhotoMediaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPhotoMediaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.adrFormatAddress != null) - message.adrFormatAddress = String(object.adrFormatAddress); - switch (object.businessStatus) { - default: - if (typeof object.businessStatus === "number") { - message.businessStatus = object.businessStatus; - break; - } - break; - case "BUSINESS_STATUS_UNSPECIFIED": - case 0: - message.businessStatus = 0; - break; - case "OPERATIONAL": - case 1: - message.businessStatus = 1; - break; - case "CLOSED_TEMPORARILY": - case 2: - message.businessStatus = 2; - break; - case "CLOSED_PERMANENTLY": - case 3: - message.businessStatus = 3; - break; - } - switch (object.priceLevel) { - default: - if (typeof object.priceLevel === "number") { - message.priceLevel = object.priceLevel; + return typeUrlPrefix + "/google.maps.places.v1.GetPhotoMediaRequest"; + }; + + return GetPhotoMediaRequest; + })(); + + v1.PhotoMedia = (function() { + + /** + * Properties of a PhotoMedia. + * @memberof google.maps.places.v1 + * @interface IPhotoMedia + * @property {string|null} [name] PhotoMedia name + * @property {string|null} [photoUri] PhotoMedia photoUri + */ + + /** + * Constructs a new PhotoMedia. + * @memberof google.maps.places.v1 + * @classdesc Represents a PhotoMedia. + * @implements IPhotoMedia + * @constructor + * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set + */ + function PhotoMedia(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhotoMedia name. + * @member {string} name + * @memberof google.maps.places.v1.PhotoMedia + * @instance + */ + PhotoMedia.prototype.name = ""; + + /** + * PhotoMedia photoUri. + * @member {string} photoUri + * @memberof google.maps.places.v1.PhotoMedia + * @instance + */ + PhotoMedia.prototype.photoUri = ""; + + /** + * Creates a new PhotoMedia instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia instance + */ + PhotoMedia.create = function create(properties) { + return new PhotoMedia(properties); + }; + + /** + * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoMedia.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.photoUri); + return writer; + }; + + /** + * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhotoMedia.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoMedia.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.PhotoMedia(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.photoUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "PRICE_LEVEL_UNSPECIFIED": - case 0: - message.priceLevel = 0; - break; - case "PRICE_LEVEL_FREE": - case 1: - message.priceLevel = 1; - break; - case "PRICE_LEVEL_INEXPENSIVE": - case 2: - message.priceLevel = 2; - break; - case "PRICE_LEVEL_MODERATE": - case 3: - message.priceLevel = 3; - break; - case "PRICE_LEVEL_EXPENSIVE": - case 4: - message.priceLevel = 4; - break; - case "PRICE_LEVEL_VERY_EXPENSIVE": - case 5: - message.priceLevel = 5; - break; - } - if (object.attributions) { - if (!Array.isArray(object.attributions)) - throw TypeError(".google.maps.places.v1.Place.attributions: array expected"); - message.attributions = []; - for (var i = 0; i < object.attributions.length; ++i) { - if (typeof object.attributions[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.attributions: object expected"); - message.attributions[i] = $root.google.maps.places.v1.Place.Attribution.fromObject(object.attributions[i]); - } } - if (object.userRatingCount != null) - message.userRatingCount = object.userRatingCount | 0; - if (object.iconMaskBaseUri != null) - message.iconMaskBaseUri = String(object.iconMaskBaseUri); - if (object.iconBackgroundColor != null) - message.iconBackgroundColor = String(object.iconBackgroundColor); - if (object.takeout != null) - message.takeout = Boolean(object.takeout); - if (object.delivery != null) - message.delivery = Boolean(object.delivery); - if (object.dineIn != null) - message.dineIn = Boolean(object.dineIn); - if (object.curbsidePickup != null) - message.curbsidePickup = Boolean(object.curbsidePickup); - if (object.reservable != null) - message.reservable = Boolean(object.reservable); - if (object.servesBreakfast != null) - message.servesBreakfast = Boolean(object.servesBreakfast); - if (object.servesLunch != null) - message.servesLunch = Boolean(object.servesLunch); - if (object.servesDinner != null) - message.servesDinner = Boolean(object.servesDinner); - if (object.servesBeer != null) - message.servesBeer = Boolean(object.servesBeer); - if (object.servesWine != null) - message.servesWine = Boolean(object.servesWine); - if (object.servesBrunch != null) - message.servesBrunch = Boolean(object.servesBrunch); - if (object.servesVegetarianFood != null) - message.servesVegetarianFood = Boolean(object.servesVegetarianFood); - if (object.currentOpeningHours != null) { - if (typeof object.currentOpeningHours !== "object") - throw TypeError(".google.maps.places.v1.Place.currentOpeningHours: object expected"); - message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentOpeningHours); + return message; + }; + + /** + * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhotoMedia.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhotoMedia message. + * @function verify + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhotoMedia.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + if (!$util.isString(message.photoUri)) + return "photoUri: string expected"; + return null; + }; + + /** + * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia + */ + PhotoMedia.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.PhotoMedia) + return object; + var message = new $root.google.maps.places.v1.PhotoMedia(); + if (object.name != null) + message.name = String(object.name); + if (object.photoUri != null) + message.photoUri = String(object.photoUri); + return message; + }; + + /** + * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {google.maps.places.v1.PhotoMedia} message PhotoMedia + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhotoMedia.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.photoUri = ""; } - if (object.currentSecondaryOpeningHours) { - if (!Array.isArray(object.currentSecondaryOpeningHours)) - throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: array expected"); - message.currentSecondaryOpeningHours = []; - for (var i = 0; i < object.currentSecondaryOpeningHours.length; ++i) { - if (typeof object.currentSecondaryOpeningHours[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: object expected"); - message.currentSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentSecondaryOpeningHours[i]); - } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.photoUri != null && message.hasOwnProperty("photoUri")) + object.photoUri = message.photoUri; + return object; + }; + + /** + * Converts this PhotoMedia to JSON. + * @function toJSON + * @memberof google.maps.places.v1.PhotoMedia + * @instance + * @returns {Object.} JSON object + */ + PhotoMedia.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhotoMedia + * @function getTypeUrl + * @memberof google.maps.places.v1.PhotoMedia + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhotoMedia.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.regularSecondaryOpeningHours) { - if (!Array.isArray(object.regularSecondaryOpeningHours)) - throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: array expected"); - message.regularSecondaryOpeningHours = []; - for (var i = 0; i < object.regularSecondaryOpeningHours.length; ++i) { - if (typeof object.regularSecondaryOpeningHours[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.regularSecondaryOpeningHours: object expected"); - message.regularSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.regularSecondaryOpeningHours[i]); + return typeUrlPrefix + "/google.maps.places.v1.PhotoMedia"; + }; + + return PhotoMedia; + })(); + + v1.GetPlaceRequest = (function() { + + /** + * Properties of a GetPlaceRequest. + * @memberof google.maps.places.v1 + * @interface IGetPlaceRequest + * @property {string|null} [name] GetPlaceRequest name + * @property {string|null} [languageCode] GetPlaceRequest languageCode + * @property {string|null} [regionCode] GetPlaceRequest regionCode + * @property {string|null} [sessionToken] GetPlaceRequest sessionToken + */ + + /** + * Constructs a new GetPlaceRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a GetPlaceRequest. + * @implements IGetPlaceRequest + * @constructor + * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set + */ + function GetPlaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPlaceRequest name. + * @member {string} name + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.name = ""; + + /** + * GetPlaceRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.languageCode = ""; + + /** + * GetPlaceRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.regionCode = ""; + + /** + * GetPlaceRequest sessionToken. + * @member {string} sessionToken + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + */ + GetPlaceRequest.prototype.sessionToken = ""; + + /** + * Creates a new GetPlaceRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest instance + */ + GetPlaceRequest.create = function create(properties) { + return new GetPlaceRequest(properties); + }; + + /** + * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionToken); + return writer; + }; + + /** + * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPlaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPlaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.sessionToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } - if (object.editorialSummary != null) { - if (typeof object.editorialSummary !== "object") - throw TypeError(".google.maps.places.v1.Place.editorialSummary: object expected"); - message.editorialSummary = $root.google.type.LocalizedText.fromObject(object.editorialSummary); - } - if (object.outdoorSeating != null) - message.outdoorSeating = Boolean(object.outdoorSeating); - if (object.liveMusic != null) - message.liveMusic = Boolean(object.liveMusic); - if (object.menuForChildren != null) - message.menuForChildren = Boolean(object.menuForChildren); - if (object.servesCocktails != null) - message.servesCocktails = Boolean(object.servesCocktails); - if (object.servesDessert != null) - message.servesDessert = Boolean(object.servesDessert); - if (object.servesCoffee != null) - message.servesCoffee = Boolean(object.servesCoffee); - if (object.goodForChildren != null) - message.goodForChildren = Boolean(object.goodForChildren); - if (object.allowsDogs != null) - message.allowsDogs = Boolean(object.allowsDogs); - if (object.restroom != null) - message.restroom = Boolean(object.restroom); - if (object.goodForGroups != null) - message.goodForGroups = Boolean(object.goodForGroups); - if (object.goodForWatchingSports != null) - message.goodForWatchingSports = Boolean(object.goodForWatchingSports); - if (object.paymentOptions != null) { - if (typeof object.paymentOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.paymentOptions: object expected"); - message.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.fromObject(object.paymentOptions); - } - if (object.parkingOptions != null) { - if (typeof object.parkingOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.parkingOptions: object expected"); - message.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.fromObject(object.parkingOptions); - } - if (object.subDestinations) { - if (!Array.isArray(object.subDestinations)) - throw TypeError(".google.maps.places.v1.Place.subDestinations: array expected"); - message.subDestinations = []; - for (var i = 0; i < object.subDestinations.length; ++i) { - if (typeof object.subDestinations[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.subDestinations: object expected"); - message.subDestinations[i] = $root.google.maps.places.v1.Place.SubDestination.fromObject(object.subDestinations[i]); + return message; + }; + + /** + * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPlaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPlaceRequest message. + * @function verify + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPlaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (!$util.isString(message.sessionToken)) + return "sessionToken: string expected"; + return null; + }; + + /** + * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest + */ + GetPlaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.GetPlaceRequest) + return object; + var message = new $root.google.maps.places.v1.GetPlaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.sessionToken != null) + message.sessionToken = String(object.sessionToken); + return message; + }; + + /** + * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {google.maps.places.v1.GetPlaceRequest} message GetPlaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPlaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + object.regionCode = ""; + object.sessionToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + object.sessionToken = message.sessionToken; + return object; + }; + + /** + * Converts this GetPlaceRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.GetPlaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetPlaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPlaceRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.GetPlaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPlaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.GetPlaceRequest"; + }; + + return GetPlaceRequest; + })(); + + v1.AutocompletePlacesRequest = (function() { + + /** + * Properties of an AutocompletePlacesRequest. + * @memberof google.maps.places.v1 + * @interface IAutocompletePlacesRequest + * @property {string|null} [input] AutocompletePlacesRequest input + * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null} [locationBias] AutocompletePlacesRequest locationBias + * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null} [locationRestriction] AutocompletePlacesRequest locationRestriction + * @property {Array.|null} [includedPrimaryTypes] AutocompletePlacesRequest includedPrimaryTypes + * @property {Array.|null} [includedRegionCodes] AutocompletePlacesRequest includedRegionCodes + * @property {string|null} [languageCode] AutocompletePlacesRequest languageCode + * @property {string|null} [regionCode] AutocompletePlacesRequest regionCode + * @property {google.type.ILatLng|null} [origin] AutocompletePlacesRequest origin + * @property {number|null} [inputOffset] AutocompletePlacesRequest inputOffset + * @property {boolean|null} [includeQueryPredictions] AutocompletePlacesRequest includeQueryPredictions + * @property {string|null} [sessionToken] AutocompletePlacesRequest sessionToken + */ + + /** + * Constructs a new AutocompletePlacesRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents an AutocompletePlacesRequest. + * @implements IAutocompletePlacesRequest + * @constructor + * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set + */ + function AutocompletePlacesRequest(properties) { + this.includedPrimaryTypes = []; + this.includedRegionCodes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutocompletePlacesRequest input. + * @member {string} input + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.input = ""; + + /** + * AutocompletePlacesRequest locationBias. + * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null|undefined} locationBias + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.locationBias = null; + + /** + * AutocompletePlacesRequest locationRestriction. + * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.locationRestriction = null; + + /** + * AutocompletePlacesRequest includedPrimaryTypes. + * @member {Array.} includedPrimaryTypes + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includedPrimaryTypes = $util.emptyArray; + + /** + * AutocompletePlacesRequest includedRegionCodes. + * @member {Array.} includedRegionCodes + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includedRegionCodes = $util.emptyArray; + + /** + * AutocompletePlacesRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.languageCode = ""; + + /** + * AutocompletePlacesRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.regionCode = ""; + + /** + * AutocompletePlacesRequest origin. + * @member {google.type.ILatLng|null|undefined} origin + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.origin = null; + + /** + * AutocompletePlacesRequest inputOffset. + * @member {number} inputOffset + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.inputOffset = 0; + + /** + * AutocompletePlacesRequest includeQueryPredictions. + * @member {boolean} includeQueryPredictions + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.includeQueryPredictions = false; + + /** + * AutocompletePlacesRequest sessionToken. + * @member {string} sessionToken + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + */ + AutocompletePlacesRequest.prototype.sessionToken = ""; + + /** + * Creates a new AutocompletePlacesRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest instance + */ + AutocompletePlacesRequest.create = function create(properties) { + return new AutocompletePlacesRequest(properties); + }; + + /** + * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.input); + if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) + $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.includedPrimaryTypes[i]); + if (message.includedRegionCodes != null && message.includedRegionCodes.length) + for (var i = 0; i < message.includedRegionCodes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedRegionCodes[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.regionCode); + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + $root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.inputOffset != null && Object.hasOwnProperty.call(message, "inputOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.inputOffset); + if (message.includeQueryPredictions != null && Object.hasOwnProperty.call(message, "includeQueryPredictions")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.includeQueryPredictions); + if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.sessionToken); + return writer; + }; + + /** + * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.input = reader.string(); + break; + } + case 2: { + message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.decode(reader, reader.uint32()); + break; + } + case 3: { + message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) + message.includedPrimaryTypes = []; + message.includedPrimaryTypes.push(reader.string()); + break; + } + case 5: { + if (!(message.includedRegionCodes && message.includedRegionCodes.length)) + message.includedRegionCodes = []; + message.includedRegionCodes.push(reader.string()); + break; + } + case 6: { + message.languageCode = reader.string(); + break; + } + case 7: { + message.regionCode = reader.string(); + break; + } + case 8: { + message.origin = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 9: { + message.inputOffset = reader.int32(); + break; + } + case 10: { + message.includeQueryPredictions = reader.bool(); + break; + } + case 11: { + message.sessionToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutocompletePlacesRequest message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutocompletePlacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.input != null && message.hasOwnProperty("input")) + if (!$util.isString(message.input)) + return "input: string expected"; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) { + var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify(message.locationBias); + if (error) + return "locationBias." + error; + } + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { + if (!Array.isArray(message.includedPrimaryTypes)) + return "includedPrimaryTypes: array expected"; + for (var i = 0; i < message.includedPrimaryTypes.length; ++i) + if (!$util.isString(message.includedPrimaryTypes[i])) + return "includedPrimaryTypes: string[] expected"; + } + if (message.includedRegionCodes != null && message.hasOwnProperty("includedRegionCodes")) { + if (!Array.isArray(message.includedRegionCodes)) + return "includedRegionCodes: array expected"; + for (var i = 0; i < message.includedRegionCodes.length; ++i) + if (!$util.isString(message.includedRegionCodes[i])) + return "includedRegionCodes: string[] expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.origin != null && message.hasOwnProperty("origin")) { + var error = $root.google.type.LatLng.verify(message.origin); + if (error) + return "origin." + error; + } + if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) + if (!$util.isInteger(message.inputOffset)) + return "inputOffset: integer expected"; + if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) + if (typeof message.includeQueryPredictions !== "boolean") + return "includeQueryPredictions: boolean expected"; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + if (!$util.isString(message.sessionToken)) + return "sessionToken: string expected"; + return null; + }; + + /** + * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest + */ + AutocompletePlacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); + if (object.input != null) + message.input = String(object.input); + if (object.locationBias != null) { + if (typeof object.locationBias !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationBias: object expected"); + message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.fromObject(object.locationBias); + } + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.fromObject(object.locationRestriction); + } + if (object.includedPrimaryTypes) { + if (!Array.isArray(object.includedPrimaryTypes)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedPrimaryTypes: array expected"); + message.includedPrimaryTypes = []; + for (var i = 0; i < object.includedPrimaryTypes.length; ++i) + message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); + } + if (object.includedRegionCodes) { + if (!Array.isArray(object.includedRegionCodes)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedRegionCodes: array expected"); + message.includedRegionCodes = []; + for (var i = 0; i < object.includedRegionCodes.length; ++i) + message.includedRegionCodes[i] = String(object.includedRegionCodes[i]); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.origin != null) { + if (typeof object.origin !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.origin: object expected"); + message.origin = $root.google.type.LatLng.fromObject(object.origin); + } + if (object.inputOffset != null) + message.inputOffset = object.inputOffset | 0; + if (object.includeQueryPredictions != null) + message.includeQueryPredictions = Boolean(object.includeQueryPredictions); + if (object.sessionToken != null) + message.sessionToken = String(object.sessionToken); + return message; + }; + + /** + * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest} message AutocompletePlacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutocompletePlacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedPrimaryTypes = []; + object.includedRegionCodes = []; + } + if (options.defaults) { + object.input = ""; + object.locationBias = null; + object.locationRestriction = null; + object.languageCode = ""; + object.regionCode = ""; + object.origin = null; + object.inputOffset = 0; + object.includeQueryPredictions = false; + object.sessionToken = ""; + } + if (message.input != null && message.hasOwnProperty("input")) + object.input = message.input; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) + object.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.toObject(message.locationBias, options); + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.toObject(message.locationRestriction, options); + if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { + object.includedPrimaryTypes = []; + for (var j = 0; j < message.includedPrimaryTypes.length; ++j) + object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; + } + if (message.includedRegionCodes && message.includedRegionCodes.length) { + object.includedRegionCodes = []; + for (var j = 0; j < message.includedRegionCodes.length; ++j) + object.includedRegionCodes[j] = message.includedRegionCodes[j]; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.origin != null && message.hasOwnProperty("origin")) + object.origin = $root.google.type.LatLng.toObject(message.origin, options); + if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) + object.inputOffset = message.inputOffset; + if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) + object.includeQueryPredictions = message.includeQueryPredictions; + if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) + object.sessionToken = message.sessionToken; + return object; + }; + + /** + * Converts this AutocompletePlacesRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @instance + * @returns {Object.} JSON object + */ + AutocompletePlacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutocompletePlacesRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutocompletePlacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest"; + }; + + AutocompletePlacesRequest.LocationBias = (function() { + + /** + * Properties of a LocationBias. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @interface ILocationBias + * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle + */ + + /** + * Constructs a new LocationBias. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @classdesc Represents a LocationBias. + * @implements ILocationBias + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set + */ + function LocationBias(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationBias rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + LocationBias.prototype.rectangle = null; + + /** + * LocationBias circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + LocationBias.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationBias type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + */ + Object.defineProperty(LocationBias.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationBias instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias instance + */ + LocationBias.create = function create(properties) { + return new LocationBias(properties); + }; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationBias message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationBias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias + */ + LocationBias.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} message LocationBias + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationBias.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationBias to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @instance + * @returns {Object.} JSON object + */ + LocationBias.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationBias + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationBias"; + }; + + return LocationBias; + })(); + + AutocompletePlacesRequest.LocationRestriction = (function() { + + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @interface ILocationRestriction + * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle + */ + + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.AutocompletePlacesRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationRestriction rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.rectangle = null; + + /** + * LocationRestriction circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + return AutocompletePlacesRequest; + })(); + + v1.AutocompletePlacesResponse = (function() { + + /** + * Properties of an AutocompletePlacesResponse. + * @memberof google.maps.places.v1 + * @interface IAutocompletePlacesResponse + * @property {Array.|null} [suggestions] AutocompletePlacesResponse suggestions + */ + + /** + * Constructs a new AutocompletePlacesResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents an AutocompletePlacesResponse. + * @implements IAutocompletePlacesResponse + * @constructor + * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set + */ + function AutocompletePlacesResponse(properties) { + this.suggestions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutocompletePlacesResponse suggestions. + * @member {Array.} suggestions + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @instance + */ + AutocompletePlacesResponse.prototype.suggestions = $util.emptyArray; + + /** + * Creates a new AutocompletePlacesResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse instance + */ + AutocompletePlacesResponse.create = function create(properties) { + return new AutocompletePlacesResponse(properties); + }; + + /** + * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutocompletePlacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutocompletePlacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutocompletePlacesResponse message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutocompletePlacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify(message.suggestions[i]); + if (error) + return "suggestions." + error; + } + } + return null; + }; + + /** + * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse + */ + AutocompletePlacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: object expected"); + message.suggestions[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.fromObject(object.suggestions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse} message AutocompletePlacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutocompletePlacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.toObject(message.suggestions[j], options); + } + return object; + }; + + /** + * Converts this AutocompletePlacesResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @instance + * @returns {Object.} JSON object + */ + AutocompletePlacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutocompletePlacesResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutocompletePlacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse"; + }; + + AutocompletePlacesResponse.Suggestion = (function() { + + /** + * Properties of a Suggestion. + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @interface ISuggestion + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null} [placePrediction] Suggestion placePrediction + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null} [queryPrediction] Suggestion queryPrediction + */ + + /** + * Constructs a new Suggestion. + * @memberof google.maps.places.v1.AutocompletePlacesResponse + * @classdesc Represents a Suggestion. + * @implements ISuggestion + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set + */ + function Suggestion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Suggestion placePrediction. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null|undefined} placePrediction + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Suggestion.prototype.placePrediction = null; + + /** + * Suggestion queryPrediction. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null|undefined} queryPrediction + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Suggestion.prototype.queryPrediction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Suggestion kind. + * @member {"placePrediction"|"queryPrediction"|undefined} kind + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + */ + Object.defineProperty(Suggestion.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["placePrediction", "queryPrediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Suggestion instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion instance + */ + Suggestion.create = function create(properties) { + return new Suggestion(properties); + }; + + /** + * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.placePrediction != null && Object.hasOwnProperty.call(message, "placePrediction")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.encode(message.placePrediction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryPrediction != null && Object.hasOwnProperty.call(message, "queryPrediction")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.encode(message.queryPrediction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Suggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.decode(reader, reader.uint32()); + break; + } + case 2: { + message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Suggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Suggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Suggestion message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Suggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { + properties.kind = 1; + { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify(message.placePrediction); + if (error) + return "placePrediction." + error; + } + } + if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify(message.queryPrediction); + if (error) + return "queryPrediction." + error; + } + } + return null; + }; + + /** + * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion + */ + Suggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); + if (object.placePrediction != null) { + if (typeof object.placePrediction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.placePrediction: object expected"); + message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.fromObject(object.placePrediction); + } + if (object.queryPrediction != null) { + if (typeof object.queryPrediction !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.queryPrediction: object expected"); + message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.fromObject(object.queryPrediction); + } + return message; + }; + + /** + * Creates a plain object from a Suggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} message Suggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Suggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { + object.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.toObject(message.placePrediction, options); + if (options.oneofs) + object.kind = "placePrediction"; + } + if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { + object.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.toObject(message.queryPrediction, options); + if (options.oneofs) + object.kind = "queryPrediction"; + } + return object; + }; + + /** + * Converts this Suggestion to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @instance + * @returns {Object.} JSON object + */ + Suggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Suggestion + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Suggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion"; + }; + + Suggestion.StringRange = (function() { + + /** + * Properties of a StringRange. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IStringRange + * @property {number|null} [startOffset] StringRange startOffset + * @property {number|null} [endOffset] StringRange endOffset + */ + + /** + * Constructs a new StringRange. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a StringRange. + * @implements IStringRange + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set + */ + function StringRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringRange startOffset. + * @member {number} startOffset + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + */ + StringRange.prototype.startOffset = 0; + + /** + * StringRange endOffset. + * @member {number} endOffset + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + */ + StringRange.prototype.endOffset = 0; + + /** + * Creates a new StringRange instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange instance + */ + StringRange.create = function create(properties) { + return new StringRange(properties); + }; + + /** + * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startOffset); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endOffset); + return writer; + }; + + /** + * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringRange message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startOffset = reader.int32(); + break; + } + case 2: { + message.endOffset = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringRange message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + if (!$util.isInteger(message.startOffset)) + return "startOffset: integer expected"; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + if (!$util.isInteger(message.endOffset)) + return "endOffset: integer expected"; + return null; + }; + + /** + * Creates a StringRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange + */ + StringRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); + if (object.startOffset != null) + message.startOffset = object.startOffset | 0; + if (object.endOffset != null) + message.endOffset = object.endOffset | 0; + return message; + }; + + /** + * Creates a plain object from a StringRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} message StringRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startOffset = 0; + object.endOffset = 0; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = message.startOffset; + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = message.endOffset; + return object; + }; + + /** + * Converts this StringRange to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @instance + * @returns {Object.} JSON object + */ + StringRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringRange + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange"; + }; + + return StringRange; + })(); + + Suggestion.FormattableText = (function() { + + /** + * Properties of a FormattableText. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IFormattableText + * @property {string|null} [text] FormattableText text + * @property {Array.|null} [matches] FormattableText matches + */ + + /** + * Constructs a new FormattableText. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a FormattableText. + * @implements IFormattableText + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set + */ + function FormattableText(properties) { + this.matches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FormattableText text. + * @member {string} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + */ + FormattableText.prototype.text = ""; + + /** + * FormattableText matches. + * @member {Array.} matches + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + */ + FormattableText.prototype.matches = $util.emptyArray; + + /** + * Creates a new FormattableText instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText instance + */ + FormattableText.create = function create(properties) { + return new FormattableText(properties); + }; + + /** + * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormattableText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.matches != null && message.matches.length) + for (var i = 0; i < message.matches.length; ++i) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.encode(message.matches[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FormattableText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FormattableText message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormattableText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.matches && message.matches.length)) + message.matches = []; + message.matches.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FormattableText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FormattableText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FormattableText message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FormattableText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.matches != null && message.hasOwnProperty("matches")) { + if (!Array.isArray(message.matches)) + return "matches: array expected"; + for (var i = 0; i < message.matches.length; ++i) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify(message.matches[i]); + if (error) + return "matches." + error; + } + } + return null; + }; + + /** + * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText + */ + FormattableText.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); + if (object.text != null) + message.text = String(object.text); + if (object.matches) { + if (!Array.isArray(object.matches)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: array expected"); + message.matches = []; + for (var i = 0; i < object.matches.length; ++i) { + if (typeof object.matches[i] !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: object expected"); + message.matches[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.fromObject(object.matches[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FormattableText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} message FormattableText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FormattableText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.matches = []; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.matches && message.matches.length) { + object.matches = []; + for (var j = 0; j < message.matches.length; ++j) + object.matches[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.toObject(message.matches[j], options); + } + return object; + }; + + /** + * Converts this FormattableText to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @instance + * @returns {Object.} JSON object + */ + FormattableText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FormattableText + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FormattableText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText"; + }; + + return FormattableText; + })(); + + Suggestion.StructuredFormat = (function() { + + /** + * Properties of a StructuredFormat. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IStructuredFormat + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [mainText] StructuredFormat mainText + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [secondaryText] StructuredFormat secondaryText + */ + + /** + * Constructs a new StructuredFormat. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a StructuredFormat. + * @implements IStructuredFormat + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set + */ + function StructuredFormat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - } - if (object.accessibilityOptions != null) { - if (typeof object.accessibilityOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.accessibilityOptions: object expected"); - message.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.fromObject(object.accessibilityOptions); - } - if (object.fuelOptions != null) { - if (typeof object.fuelOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.fuelOptions: object expected"); - message.fuelOptions = $root.google.maps.places.v1.FuelOptions.fromObject(object.fuelOptions); - } - if (object.evChargeOptions != null) { - if (typeof object.evChargeOptions !== "object") - throw TypeError(".google.maps.places.v1.Place.evChargeOptions: object expected"); - message.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.fromObject(object.evChargeOptions); - } - return message; - }; - /** - * Creates a plain object from a Place message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place - * @static - * @param {google.maps.places.v1.Place} message Place - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Place.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.types = []; - object.addressComponents = []; - object.attributions = []; - object.currentSecondaryOpeningHours = []; - object.regularSecondaryOpeningHours = []; - object.reviews = []; - object.photos = []; - object.subDestinations = []; - } - if (options.defaults) { - object.name = ""; - object.id = ""; - object.nationalPhoneNumber = ""; - object.internationalPhoneNumber = ""; - object.formattedAddress = ""; - object.plusCode = null; - object.location = null; - object.viewport = null; - object.rating = 0; - object.googleMapsUri = ""; - object.websiteUri = ""; - object.regularOpeningHours = null; - object.adrFormatAddress = ""; - object.businessStatus = options.enums === String ? "BUSINESS_STATUS_UNSPECIFIED" : 0; - object.priceLevel = options.enums === String ? "PRICE_LEVEL_UNSPECIFIED" : 0; - object.iconMaskBaseUri = ""; - object.iconBackgroundColor = ""; - object.displayName = null; - object.primaryTypeDisplayName = null; - object.currentOpeningHours = null; - object.primaryType = ""; - object.shortFormattedAddress = ""; - object.editorialSummary = null; - object.paymentOptions = null; - object.parkingOptions = null; - object.fuelOptions = null; - object.evChargeOptions = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) - object.nationalPhoneNumber = message.nationalPhoneNumber; - if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) - object.internationalPhoneNumber = message.internationalPhoneNumber; - if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) - object.formattedAddress = message.formattedAddress; - if (message.addressComponents && message.addressComponents.length) { - object.addressComponents = []; - for (var j = 0; j < message.addressComponents.length; ++j) - object.addressComponents[j] = $root.google.maps.places.v1.Place.AddressComponent.toObject(message.addressComponents[j], options); - } - if (message.plusCode != null && message.hasOwnProperty("plusCode")) - object.plusCode = $root.google.maps.places.v1.Place.PlusCode.toObject(message.plusCode, options); - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.type.LatLng.toObject(message.location, options); - if (message.viewport != null && message.hasOwnProperty("viewport")) - object.viewport = $root.google.geo.type.Viewport.toObject(message.viewport, options); - if (message.rating != null && message.hasOwnProperty("rating")) - object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; - if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) - object.googleMapsUri = message.googleMapsUri; - if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) - object.websiteUri = message.websiteUri; - if (message.regularOpeningHours != null && message.hasOwnProperty("regularOpeningHours")) - object.regularOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularOpeningHours, options); - if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) { - object.utcOffsetMinutes = message.utcOffsetMinutes; - if (options.oneofs) - object._utcOffsetMinutes = "utcOffsetMinutes"; - } - if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) - object.adrFormatAddress = message.adrFormatAddress; - if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) - object.businessStatus = options.enums === String ? $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] === undefined ? message.businessStatus : $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] : message.businessStatus; - if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) - object.priceLevel = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevel] === undefined ? message.priceLevel : $root.google.maps.places.v1.PriceLevel[message.priceLevel] : message.priceLevel; - if (message.attributions && message.attributions.length) { - object.attributions = []; - for (var j = 0; j < message.attributions.length; ++j) - object.attributions[j] = $root.google.maps.places.v1.Place.Attribution.toObject(message.attributions[j], options); - } - if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) { - object.userRatingCount = message.userRatingCount; - if (options.oneofs) - object._userRatingCount = "userRatingCount"; - } - if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) - object.iconMaskBaseUri = message.iconMaskBaseUri; - if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) - object.iconBackgroundColor = message.iconBackgroundColor; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = $root.google.type.LocalizedText.toObject(message.displayName, options); - if (message.primaryTypeDisplayName != null && message.hasOwnProperty("primaryTypeDisplayName")) - object.primaryTypeDisplayName = $root.google.type.LocalizedText.toObject(message.primaryTypeDisplayName, options); - if (message.takeout != null && message.hasOwnProperty("takeout")) { - object.takeout = message.takeout; - if (options.oneofs) - object._takeout = "takeout"; - } - if (message.delivery != null && message.hasOwnProperty("delivery")) { - object.delivery = message.delivery; - if (options.oneofs) - object._delivery = "delivery"; - } - if (message.dineIn != null && message.hasOwnProperty("dineIn")) { - object.dineIn = message.dineIn; - if (options.oneofs) - object._dineIn = "dineIn"; - } - if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { - object.curbsidePickup = message.curbsidePickup; - if (options.oneofs) - object._curbsidePickup = "curbsidePickup"; - } - if (message.reservable != null && message.hasOwnProperty("reservable")) { - object.reservable = message.reservable; - if (options.oneofs) - object._reservable = "reservable"; - } - if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { - object.servesBreakfast = message.servesBreakfast; - if (options.oneofs) - object._servesBreakfast = "servesBreakfast"; - } - if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { - object.servesLunch = message.servesLunch; - if (options.oneofs) - object._servesLunch = "servesLunch"; - } - if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { - object.servesDinner = message.servesDinner; - if (options.oneofs) - object._servesDinner = "servesDinner"; - } - if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { - object.servesBeer = message.servesBeer; - if (options.oneofs) - object._servesBeer = "servesBeer"; - } - if (message.servesWine != null && message.hasOwnProperty("servesWine")) { - object.servesWine = message.servesWine; - if (options.oneofs) - object._servesWine = "servesWine"; - } - if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { - object.servesBrunch = message.servesBrunch; - if (options.oneofs) - object._servesBrunch = "servesBrunch"; - } - if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { - object.servesVegetarianFood = message.servesVegetarianFood; - if (options.oneofs) - object._servesVegetarianFood = "servesVegetarianFood"; - } - if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) - object.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentOpeningHours, options); - if (message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length) { - object.currentSecondaryOpeningHours = []; - for (var j = 0; j < message.currentSecondaryOpeningHours.length; ++j) - object.currentSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentSecondaryOpeningHours[j], options); - } - if (message.regularSecondaryOpeningHours && message.regularSecondaryOpeningHours.length) { - object.regularSecondaryOpeningHours = []; - for (var j = 0; j < message.regularSecondaryOpeningHours.length; ++j) - object.regularSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.regularSecondaryOpeningHours[j], options); - } - if (message.primaryType != null && message.hasOwnProperty("primaryType")) - object.primaryType = message.primaryType; - if (message.shortFormattedAddress != null && message.hasOwnProperty("shortFormattedAddress")) - object.shortFormattedAddress = message.shortFormattedAddress; - if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) - object.editorialSummary = $root.google.type.LocalizedText.toObject(message.editorialSummary, options); - if (message.reviews && message.reviews.length) { - object.reviews = []; - for (var j = 0; j < message.reviews.length; ++j) - object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options); - } - if (message.photos && message.photos.length) { - object.photos = []; - for (var j = 0; j < message.photos.length; ++j) - object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options); - } - if (message.outdoorSeating != null && message.hasOwnProperty("outdoorSeating")) { - object.outdoorSeating = message.outdoorSeating; - if (options.oneofs) - object._outdoorSeating = "outdoorSeating"; - } - if (message.liveMusic != null && message.hasOwnProperty("liveMusic")) { - object.liveMusic = message.liveMusic; - if (options.oneofs) - object._liveMusic = "liveMusic"; - } - if (message.menuForChildren != null && message.hasOwnProperty("menuForChildren")) { - object.menuForChildren = message.menuForChildren; - if (options.oneofs) - object._menuForChildren = "menuForChildren"; - } - if (message.servesCocktails != null && message.hasOwnProperty("servesCocktails")) { - object.servesCocktails = message.servesCocktails; - if (options.oneofs) - object._servesCocktails = "servesCocktails"; - } - if (message.servesDessert != null && message.hasOwnProperty("servesDessert")) { - object.servesDessert = message.servesDessert; - if (options.oneofs) - object._servesDessert = "servesDessert"; - } - if (message.servesCoffee != null && message.hasOwnProperty("servesCoffee")) { - object.servesCoffee = message.servesCoffee; - if (options.oneofs) - object._servesCoffee = "servesCoffee"; - } - if (message.goodForChildren != null && message.hasOwnProperty("goodForChildren")) { - object.goodForChildren = message.goodForChildren; - if (options.oneofs) - object._goodForChildren = "goodForChildren"; - } - if (message.allowsDogs != null && message.hasOwnProperty("allowsDogs")) { - object.allowsDogs = message.allowsDogs; - if (options.oneofs) - object._allowsDogs = "allowsDogs"; - } - if (message.restroom != null && message.hasOwnProperty("restroom")) { - object.restroom = message.restroom; - if (options.oneofs) - object._restroom = "restroom"; - } - if (message.goodForGroups != null && message.hasOwnProperty("goodForGroups")) { - object.goodForGroups = message.goodForGroups; - if (options.oneofs) - object._goodForGroups = "goodForGroups"; - } - if (message.goodForWatchingSports != null && message.hasOwnProperty("goodForWatchingSports")) { - object.goodForWatchingSports = message.goodForWatchingSports; - if (options.oneofs) - object._goodForWatchingSports = "goodForWatchingSports"; - } - if (message.paymentOptions != null && message.hasOwnProperty("paymentOptions")) - object.paymentOptions = $root.google.maps.places.v1.Place.PaymentOptions.toObject(message.paymentOptions, options); - if (message.parkingOptions != null && message.hasOwnProperty("parkingOptions")) - object.parkingOptions = $root.google.maps.places.v1.Place.ParkingOptions.toObject(message.parkingOptions, options); - if (message.subDestinations && message.subDestinations.length) { - object.subDestinations = []; - for (var j = 0; j < message.subDestinations.length; ++j) - object.subDestinations[j] = $root.google.maps.places.v1.Place.SubDestination.toObject(message.subDestinations[j], options); - } - if (message.accessibilityOptions != null && message.hasOwnProperty("accessibilityOptions")) { - object.accessibilityOptions = $root.google.maps.places.v1.Place.AccessibilityOptions.toObject(message.accessibilityOptions, options); - if (options.oneofs) - object._accessibilityOptions = "accessibilityOptions"; - } - if (message.fuelOptions != null && message.hasOwnProperty("fuelOptions")) - object.fuelOptions = $root.google.maps.places.v1.FuelOptions.toObject(message.fuelOptions, options); - if (message.evChargeOptions != null && message.hasOwnProperty("evChargeOptions")) - object.evChargeOptions = $root.google.maps.places.v1.EVChargeOptions.toObject(message.evChargeOptions, options); - return object; - }; + /** + * StructuredFormat mainText. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} mainText + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + */ + StructuredFormat.prototype.mainText = null; + + /** + * StructuredFormat secondaryText. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} secondaryText + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + */ + StructuredFormat.prototype.secondaryText = null; + + /** + * Creates a new StructuredFormat instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat instance + */ + StructuredFormat.create = function create(properties) { + return new StructuredFormat(properties); + }; + + /** + * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StructuredFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mainText != null && Object.hasOwnProperty.call(message, "mainText")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.mainText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.secondaryText != null && Object.hasOwnProperty.call(message, "secondaryText")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.secondaryText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StructuredFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StructuredFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StructuredFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StructuredFormat message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StructuredFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mainText != null && message.hasOwnProperty("mainText")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.mainText); + if (error) + return "mainText." + error; + } + if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.secondaryText); + if (error) + return "secondaryText." + error; + } + return null; + }; + + /** + * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat + */ + StructuredFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); + if (object.mainText != null) { + if (typeof object.mainText !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.mainText: object expected"); + message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.mainText); + } + if (object.secondaryText != null) { + if (typeof object.secondaryText !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.secondaryText: object expected"); + message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.secondaryText); + } + return message; + }; + + /** + * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} message StructuredFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StructuredFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mainText = null; + object.secondaryText = null; + } + if (message.mainText != null && message.hasOwnProperty("mainText")) + object.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.mainText, options); + if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) + object.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.secondaryText, options); + return object; + }; + + /** + * Converts this StructuredFormat to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @instance + * @returns {Object.} JSON object + */ + StructuredFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StructuredFormat + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StructuredFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat"; + }; - /** - * Converts this Place to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place - * @instance - * @returns {Object.} JSON object - */ - Place.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return StructuredFormat; + })(); - /** - * Gets the default type url for Place - * @function getTypeUrl - * @memberof google.maps.places.v1.Place - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place"; - }; + Suggestion.PlacePrediction = (function() { - Place.AddressComponent = (function() { + /** + * Properties of a PlacePrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IPlacePrediction + * @property {string|null} [place] PlacePrediction place + * @property {string|null} [placeId] PlacePrediction placeId + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] PlacePrediction text + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] PlacePrediction structuredFormat + * @property {Array.|null} [types] PlacePrediction types + * @property {number|null} [distanceMeters] PlacePrediction distanceMeters + */ - /** - * Properties of an AddressComponent. - * @memberof google.maps.places.v1.Place - * @interface IAddressComponent - * @property {string|null} [longText] AddressComponent longText - * @property {string|null} [shortText] AddressComponent shortText - * @property {Array.|null} [types] AddressComponent types - * @property {string|null} [languageCode] AddressComponent languageCode - */ + /** + * Constructs a new PlacePrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a PlacePrediction. + * @implements IPlacePrediction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set + */ + function PlacePrediction(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new AddressComponent. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an AddressComponent. - * @implements IAddressComponent - * @constructor - * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set - */ - function AddressComponent(properties) { - this.types = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * PlacePrediction place. + * @member {string} place + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.place = ""; - /** - * AddressComponent longText. - * @member {string} longText - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.longText = ""; + /** + * PlacePrediction placeId. + * @member {string} placeId + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.placeId = ""; - /** - * AddressComponent shortText. - * @member {string} shortText - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.shortText = ""; + /** + * PlacePrediction text. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.text = null; - /** - * AddressComponent types. - * @member {Array.} types - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.types = $util.emptyArray; + /** + * PlacePrediction structuredFormat. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.structuredFormat = null; - /** - * AddressComponent languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - */ - AddressComponent.prototype.languageCode = ""; + /** + * PlacePrediction types. + * @member {Array.} types + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.types = $util.emptyArray; - /** - * Creates a new AddressComponent instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent instance - */ - AddressComponent.create = function create(properties) { - return new AddressComponent(properties); - }; + /** + * PlacePrediction distanceMeters. + * @member {number} distanceMeters + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + */ + PlacePrediction.prototype.distanceMeters = 0; - /** - * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddressComponent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.longText != null && Object.hasOwnProperty.call(message, "longText")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.longText); - if (message.shortText != null && Object.hasOwnProperty.call(message, "shortText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortText); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.types[i]); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - return writer; - }; + /** + * Creates a new PlacePrediction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction instance + */ + PlacePrediction.create = function create(properties) { + return new PlacePrediction(properties); + }; - /** - * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddressComponent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacePrediction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.place != null && Object.hasOwnProperty.call(message, "place")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.place); + if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); + if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.distanceMeters); + return writer; + }; - /** - * Decodes an AddressComponent message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddressComponent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AddressComponent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.longText = reader.string(); - break; - } - case 2: { - message.shortText = reader.string(); - break; - } - case 3: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 4: { - message.languageCode = reader.string(); + /** + * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacePrediction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacePrediction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacePrediction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.place = reader.string(); + break; + } + case 2: { + message.placeId = reader.string(); + break; + } + case 3: { + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 4: { + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 6: { + message.distanceMeters = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an AddressComponent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddressComponent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacePrediction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an AddressComponent message. - * @function verify - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddressComponent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.longText != null && message.hasOwnProperty("longText")) - if (!$util.isString(message.longText)) - return "longText: string expected"; - if (message.shortText != null && message.hasOwnProperty("shortText")) - if (!$util.isString(message.shortText)) - return "shortText: string expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - return null; - }; + /** + * Verifies a PlacePrediction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacePrediction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.place != null && message.hasOwnProperty("place")) + if (!$util.isString(message.place)) + return "place: string expected"; + if (message.placeId != null && message.hasOwnProperty("placeId")) + if (!$util.isString(message.placeId)) + return "placeId: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); + if (error) + return "text." + error; + } + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); + if (error) + return "structuredFormat." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) + if (!$util.isInteger(message.distanceMeters)) + return "distanceMeters: integer expected"; + return null; + }; - /** - * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent - */ - AddressComponent.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.AddressComponent) + /** + * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction + */ + PlacePrediction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); + if (object.place != null) + message.place = String(object.place); + if (object.placeId != null) + message.placeId = String(object.placeId); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.text: object expected"); + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); + } + if (object.structuredFormat != null) { + if (typeof object.structuredFormat !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.structuredFormat: object expected"); + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.distanceMeters != null) + message.distanceMeters = object.distanceMeters | 0; + return message; + }; + + /** + * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} message PlacePrediction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacePrediction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) { + object.place = ""; + object.placeId = ""; + object.text = null; + object.structuredFormat = null; + object.distanceMeters = 0; + } + if (message.place != null && message.hasOwnProperty("place")) + object.place = message.place; + if (message.placeId != null && message.hasOwnProperty("placeId")) + object.placeId = message.placeId; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) + object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) + object.distanceMeters = message.distanceMeters; return object; - var message = new $root.google.maps.places.v1.Place.AddressComponent(); - if (object.longText != null) - message.longText = String(object.longText); - if (object.shortText != null) - message.shortText = String(object.shortText); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.Place.AddressComponent.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - return message; - }; - - /** - * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {google.maps.places.v1.Place.AddressComponent} message AddressComponent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddressComponent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) { - object.longText = ""; - object.shortText = ""; - object.languageCode = ""; - } - if (message.longText != null && message.hasOwnProperty("longText")) - object.longText = message.longText; - if (message.shortText != null && message.hasOwnProperty("shortText")) - object.shortText = message.shortText; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + }; - /** - * Converts this AddressComponent to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.AddressComponent - * @instance - * @returns {Object.} JSON object - */ - AddressComponent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this PlacePrediction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @instance + * @returns {Object.} JSON object + */ + PlacePrediction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for AddressComponent - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.AddressComponent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.AddressComponent"; - }; + /** + * Gets the default type url for PlacePrediction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacePrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction"; + }; - return AddressComponent; - })(); + return PlacePrediction; + })(); - Place.PlusCode = (function() { + Suggestion.QueryPrediction = (function() { - /** - * Properties of a PlusCode. - * @memberof google.maps.places.v1.Place - * @interface IPlusCode - * @property {string|null} [globalCode] PlusCode globalCode - * @property {string|null} [compoundCode] PlusCode compoundCode - */ + /** + * Properties of a QueryPrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @interface IQueryPrediction + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] QueryPrediction text + * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] QueryPrediction structuredFormat + */ - /** - * Constructs a new PlusCode. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a PlusCode. - * @implements IPlusCode - * @constructor - * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set - */ - function PlusCode(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new QueryPrediction. + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion + * @classdesc Represents a QueryPrediction. + * @implements IQueryPrediction + * @constructor + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set + */ + function QueryPrediction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * PlusCode globalCode. - * @member {string} globalCode - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - */ - PlusCode.prototype.globalCode = ""; + /** + * QueryPrediction text. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + */ + QueryPrediction.prototype.text = null; - /** - * PlusCode compoundCode. - * @member {string} compoundCode - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - */ - PlusCode.prototype.compoundCode = ""; + /** + * QueryPrediction structuredFormat. + * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + */ + QueryPrediction.prototype.structuredFormat = null; - /** - * Creates a new PlusCode instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode instance - */ - PlusCode.create = function create(properties) { - return new PlusCode(properties); - }; + /** + * Creates a new QueryPrediction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction instance + */ + QueryPrediction.create = function create(properties) { + return new QueryPrediction(properties); + }; - /** - * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlusCode.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode); - if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode); - return writer; - }; + /** + * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPrediction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) + $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlusCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPrediction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PlusCode message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlusCode.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PlusCode(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.globalCode = reader.string(); - break; - } - case 2: { - message.compoundCode = reader.string(); + /** + * Decodes a QueryPrediction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPrediction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); + break; + } + case 2: { + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a PlusCode message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlusCode.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPrediction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a PlusCode message. - * @function verify - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlusCode.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.globalCode != null && message.hasOwnProperty("globalCode")) - if (!$util.isString(message.globalCode)) - return "globalCode: string expected"; - if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) - if (!$util.isString(message.compoundCode)) - return "compoundCode: string expected"; - return null; - }; + /** + * Verifies a QueryPrediction message. + * @function verify + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPrediction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); + if (error) + return "text." + error; + } + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { + var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); + if (error) + return "structuredFormat." + error; + } + return null; + }; - /** - * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.PlusCode} PlusCode - */ - PlusCode.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.PlusCode) + /** + * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction + */ + QueryPrediction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction) + return object; + var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.text: object expected"); + message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); + } + if (object.structuredFormat != null) { + if (typeof object.structuredFormat !== "object") + throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.structuredFormat: object expected"); + message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); + } + return message; + }; + + /** + * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} message QueryPrediction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPrediction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = null; + object.structuredFormat = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); + if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) + object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); return object; - var message = new $root.google.maps.places.v1.Place.PlusCode(); - if (object.globalCode != null) - message.globalCode = String(object.globalCode); - if (object.compoundCode != null) - message.compoundCode = String(object.compoundCode); - return message; - }; + }; + + /** + * Converts this QueryPrediction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @instance + * @returns {Object.} JSON object + */ + QueryPrediction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryPrediction + * @function getTypeUrl + * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryPrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction"; + }; + + return QueryPrediction; + })(); + + return Suggestion; + })(); + + return AutocompletePlacesResponse; + })(); + + return v1; + })(); + + return places; + })(); + + return maps; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; - /** - * Creates a plain object from a PlusCode message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {google.maps.places.v1.Place.PlusCode} message PlusCode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlusCode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.globalCode = ""; - object.compoundCode = ""; - } - if (message.globalCode != null && message.hasOwnProperty("globalCode")) - object.globalCode = message.globalCode; - if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) - object.compoundCode = message.compoundCode; - return object; - }; + api.ResourceDescriptor = (function() { - /** - * Converts this PlusCode to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.PlusCode - * @instance - * @returns {Object.} JSON object - */ - PlusCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ - /** - * Gets the default type url for PlusCode - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.PlusCode - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.PlusCode"; - }; + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return PlusCode; - })(); + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; - Place.OpeningHours = (function() { + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; - /** - * Properties of an OpeningHours. - * @memberof google.maps.places.v1.Place - * @interface IOpeningHours - * @property {boolean|null} [openNow] OpeningHours openNow - * @property {Array.|null} [periods] OpeningHours periods - * @property {Array.|null} [weekdayDescriptions] OpeningHours weekdayDescriptions - * @property {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType|null} [secondaryHoursType] OpeningHours secondaryHoursType - * @property {Array.|null} [specialDays] OpeningHours specialDays - */ + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; - /** - * Constructs a new OpeningHours. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an OpeningHours. - * @implements IOpeningHours - * @constructor - * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set - */ - function OpeningHours(properties) { - this.periods = []; - this.weekdayDescriptions = []; - this.specialDays = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; - /** - * OpeningHours openNow. - * @member {boolean|null|undefined} openNow - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.openNow = null; + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; - /** - * OpeningHours periods. - * @member {Array.} periods - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.periods = $util.emptyArray; + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; - /** - * OpeningHours weekdayDescriptions. - * @member {Array.} weekdayDescriptions - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.weekdayDescriptions = $util.emptyArray; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; - /** - * OpeningHours secondaryHoursType. - * @member {google.maps.places.v1.Place.OpeningHours.SecondaryHoursType} secondaryHoursType - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.secondaryHoursType = 0; + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; - /** - * OpeningHours specialDays. - * @member {Array.} specialDays - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - OpeningHours.prototype.specialDays = $util.emptyArray; + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * OpeningHours _openNow. - * @member {"openNow"|undefined} _openNow - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - */ - Object.defineProperty(OpeningHours.prototype, "_openNow", { - get: $util.oneOfGetter($oneOfFields = ["openNow"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new OpeningHours instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours instance - */ - OpeningHours.create = function create(properties) { - return new OpeningHours(properties); - }; + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpeningHours.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.openNow); - if (message.periods != null && message.periods.length) - for (var i = 0; i < message.periods.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.Period.encode(message.periods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.weekdayDescriptions != null && message.weekdayDescriptions.length) - for (var i = 0; i < message.weekdayDescriptions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.weekdayDescriptions[i]); - if (message.secondaryHoursType != null && Object.hasOwnProperty.call(message, "secondaryHoursType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secondaryHoursType); - if (message.specialDays != null && message.specialDays.length) - for (var i = 0; i < message.specialDays.length; ++i) - $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.encode(message.specialDays[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; - /** - * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OpeningHours.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an OpeningHours message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpeningHours.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.openNow = reader.bool(); - break; - } - case 2: { - if (!(message.periods && message.periods.length)) - message.periods = []; - message.periods.push($root.google.maps.places.v1.Place.OpeningHours.Period.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.weekdayDescriptions && message.weekdayDescriptions.length)) - message.weekdayDescriptions = []; - message.weekdayDescriptions.push(reader.string()); - break; - } - case 4: { - message.secondaryHoursType = reader.int32(); - break; - } - case 5: { - if (!(message.specialDays && message.specialDays.length)) - message.specialDays = []; - message.specialDays.push($root.google.maps.places.v1.Place.OpeningHours.SpecialDay.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; - /** - * Decodes an OpeningHours message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OpeningHours.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); - /** - * Verifies an OpeningHours message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OpeningHours.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.openNow != null && message.hasOwnProperty("openNow")) { - properties._openNow = 1; - if (typeof message.openNow !== "boolean") - return "openNow: boolean expected"; - } - if (message.periods != null && message.hasOwnProperty("periods")) { - if (!Array.isArray(message.periods)) - return "periods: array expected"; - for (var i = 0; i < message.periods.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.verify(message.periods[i]); - if (error) - return "periods." + error; - } - } - if (message.weekdayDescriptions != null && message.hasOwnProperty("weekdayDescriptions")) { - if (!Array.isArray(message.weekdayDescriptions)) - return "weekdayDescriptions: array expected"; - for (var i = 0; i < message.weekdayDescriptions.length; ++i) - if (!$util.isString(message.weekdayDescriptions[i])) - return "weekdayDescriptions: string[] expected"; - } - if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) - switch (message.secondaryHoursType) { - default: - return "secondaryHoursType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.specialDays != null && message.hasOwnProperty("specialDays")) { - if (!Array.isArray(message.specialDays)) - return "specialDays: array expected"; - for (var i = 0; i < message.specialDays.length; ++i) { - var error = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.verify(message.specialDays[i]); - if (error) - return "specialDays." + error; - } - } - return null; - }; + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours - */ - OpeningHours.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours(); - if (object.openNow != null) - message.openNow = Boolean(object.openNow); - if (object.periods) { - if (!Array.isArray(object.periods)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: array expected"); - message.periods = []; - for (var i = 0; i < object.periods.length; ++i) { - if (typeof object.periods[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: object expected"); - message.periods[i] = $root.google.maps.places.v1.Place.OpeningHours.Period.fromObject(object.periods[i]); - } - } - if (object.weekdayDescriptions) { - if (!Array.isArray(object.weekdayDescriptions)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.weekdayDescriptions: array expected"); - message.weekdayDescriptions = []; - for (var i = 0; i < object.weekdayDescriptions.length; ++i) - message.weekdayDescriptions[i] = String(object.weekdayDescriptions[i]); - } - switch (object.secondaryHoursType) { - default: - if (typeof object.secondaryHoursType === "number") { - message.secondaryHoursType = object.secondaryHoursType; - break; - } - break; - case "SECONDARY_HOURS_TYPE_UNSPECIFIED": - case 0: - message.secondaryHoursType = 0; - break; - case "DRIVE_THROUGH": - case 1: - message.secondaryHoursType = 1; - break; - case "HAPPY_HOUR": - case 2: - message.secondaryHoursType = 2; - break; - case "DELIVERY": - case 3: - message.secondaryHoursType = 3; - break; - case "TAKEOUT": - case 4: - message.secondaryHoursType = 4; - break; - case "KITCHEN": - case 5: - message.secondaryHoursType = 5; - break; - case "BREAKFAST": - case 6: - message.secondaryHoursType = 6; - break; - case "LUNCH": - case 7: - message.secondaryHoursType = 7; - break; - case "DINNER": - case 8: - message.secondaryHoursType = 8; - break; - case "BRUNCH": - case 9: - message.secondaryHoursType = 9; - break; - case "PICKUP": - case 10: - message.secondaryHoursType = 10; - break; - case "ACCESS": - case 11: - message.secondaryHoursType = 11; - break; - case "SENIOR_HOURS": - case 12: - message.secondaryHoursType = 12; - break; - case "ONLINE_SERVICE_HOURS": - case 13: - message.secondaryHoursType = 13; - break; - } - if (object.specialDays) { - if (!Array.isArray(object.specialDays)) - throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: array expected"); - message.specialDays = []; - for (var i = 0; i < object.specialDays.length; ++i) { - if (typeof object.specialDays[i] !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: object expected"); - message.specialDays[i] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.fromObject(object.specialDays[i]); - } - } - return message; - }; + return ResourceDescriptor; + })(); - /** - * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {google.maps.places.v1.Place.OpeningHours} message OpeningHours - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OpeningHours.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.periods = []; - object.weekdayDescriptions = []; - object.specialDays = []; - } - if (options.defaults) - object.secondaryHoursType = options.enums === String ? "SECONDARY_HOURS_TYPE_UNSPECIFIED" : 0; - if (message.openNow != null && message.hasOwnProperty("openNow")) { - object.openNow = message.openNow; - if (options.oneofs) - object._openNow = "openNow"; - } - if (message.periods && message.periods.length) { - object.periods = []; - for (var j = 0; j < message.periods.length; ++j) - object.periods[j] = $root.google.maps.places.v1.Place.OpeningHours.Period.toObject(message.periods[j], options); - } - if (message.weekdayDescriptions && message.weekdayDescriptions.length) { - object.weekdayDescriptions = []; - for (var j = 0; j < message.weekdayDescriptions.length; ++j) - object.weekdayDescriptions[j] = message.weekdayDescriptions[j]; - } - if (message.secondaryHoursType != null && message.hasOwnProperty("secondaryHoursType")) - object.secondaryHoursType = options.enums === String ? $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] === undefined ? message.secondaryHoursType : $root.google.maps.places.v1.Place.OpeningHours.SecondaryHoursType[message.secondaryHoursType] : message.secondaryHoursType; - if (message.specialDays && message.specialDays.length) { - object.specialDays = []; - for (var j = 0; j < message.specialDays.length; ++j) - object.specialDays[j] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.toObject(message.specialDays[j], options); - } - return object; - }; + api.ResourceReference = (function() { - /** - * Converts this OpeningHours to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours - * @instance - * @returns {Object.} JSON object - */ - OpeningHours.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ - /** - * Gets the default type url for OpeningHours - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OpeningHours.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours"; - }; + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - OpeningHours.Period = (function() { + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - /** - * Properties of a Period. - * @memberof google.maps.places.v1.Place.OpeningHours - * @interface IPeriod - * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [open] Period open - * @property {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null} [close] Period close - */ + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; - /** - * Constructs a new Period. - * @memberof google.maps.places.v1.Place.OpeningHours - * @classdesc Represents a Period. - * @implements IPeriod - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set - */ - function Period(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; - /** - * Period open. - * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} open - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - */ - Period.prototype.open = null; + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; - /** - * Period close. - * @member {google.maps.places.v1.Place.OpeningHours.Period.IPoint|null|undefined} close - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - */ - Period.prototype.close = null; + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new Period instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period instance - */ - Period.create = function create(properties) { - return new Period(properties); - }; + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Period message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.open != null && Object.hasOwnProperty.call(message, "open")) - $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.open, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.close != null && Object.hasOwnProperty.call(message, "close")) - $root.google.maps.places.v1.Place.OpeningHours.Period.Point.encode(message.close, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; - /** - * Decodes a Period message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); - break; - } - case 2: { - message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; - /** - * Verifies a Period message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Period.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.open != null && message.hasOwnProperty("open")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.open); - if (error) - return "open." + error; - } - if (message.close != null && message.hasOwnProperty("close")) { - var error = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.verify(message.close); - if (error) - return "close." + error; - } - return null; - }; + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.Period} Period - */ - Period.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.Period(); - if (object.open != null) { - if (typeof object.open !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.open: object expected"); - message.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.open); - } - if (object.close != null) { - if (typeof object.close !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.close: object expected"); - message.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.fromObject(object.close); - } - return message; - }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period} message Period - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Period.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.open = null; - object.close = null; - } - if (message.open != null && message.hasOwnProperty("open")) - object.open = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.open, options); - if (message.close != null && message.hasOwnProperty("close")) - object.close = $root.google.maps.places.v1.Place.OpeningHours.Period.Point.toObject(message.close, options); - return object; - }; + return ResourceReference; + })(); - /** - * Converts this Period to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @instance - * @returns {Object.} JSON object - */ - Period.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); - /** - * Gets the default type url for Period - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Period.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period"; - }; + api.Http = (function() { - Period.Point = (function() { + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ - /** - * Properties of a Point. - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @interface IPoint - * @property {number|null} [day] Point day - * @property {number|null} [hour] Point hour - * @property {number|null} [minute] Point minute - * @property {google.type.IDate|null} [date] Point date - * @property {boolean|null} [truncated] Point truncated - */ + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Point. - * @memberof google.maps.places.v1.Place.OpeningHours.Period - * @classdesc Represents a Point. - * @implements IPoint - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set - */ - function Point(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; - /** - * Point day. - * @member {number|null|undefined} day - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.day = null; + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; - /** - * Point hour. - * @member {number|null|undefined} hour - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.hour = null; + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; - /** - * Point minute. - * @member {number|null|undefined} minute - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.minute = null; + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; - /** - * Point date. - * @member {google.type.IDate|null|undefined} date - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.date = null; + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Point truncated. - * @member {boolean} truncated - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Point.prototype.truncated = false; + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Point _day. - * @member {"day"|undefined} _day - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_day", { - get: $util.oneOfGetter($oneOfFields = ["day"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; - /** - * Point _hour. - * @member {"hour"|undefined} _hour - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_hour", { - get: $util.oneOfGetter($oneOfFields = ["hour"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; - /** - * Point _minute. - * @member {"minute"|undefined} _minute - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - */ - Object.defineProperty(Point.prototype, "_minute", { - get: $util.oneOfGetter($oneOfFields = ["minute"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; - /** - * Creates a new Point instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point instance - */ - Point.create = function create(properties) { - return new Point(properties); - }; + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified Point message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day); - if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hour); - if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minute); - if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.truncated); - if (message.date != null && Object.hasOwnProperty.call(message, "date")) - $root.google.type.Date.encode(message.date, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.Period.Point.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return Http; + })(); - /** - * Decodes a Point message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Point.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.day = reader.int32(); - break; - } - case 2: { - message.hour = reader.int32(); - break; - } - case 3: { - message.minute = reader.int32(); - break; - } - case 6: { - message.date = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 5: { - message.truncated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + api.HttpRule = (function() { - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Point.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ - /** - * Verifies a Point message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Point.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.day != null && message.hasOwnProperty("day")) { - properties._day = 1; - if (!$util.isInteger(message.day)) - return "day: integer expected"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - properties._hour = 1; - if (!$util.isInteger(message.hour)) - return "hour: integer expected"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - properties._minute = 1; - if (!$util.isInteger(message.minute)) - return "minute: integer expected"; - } - if (message.date != null && message.hasOwnProperty("date")) { - var error = $root.google.type.Date.verify(message.date); - if (error) - return "date." + error; - } - if (message.truncated != null && message.hasOwnProperty("truncated")) - if (typeof message.truncated !== "boolean") - return "truncated: boolean expected"; - return null; - }; + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.Period.Point} Point - */ - Point.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.Period.Point) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.Period.Point(); - if (object.day != null) - message.day = object.day | 0; - if (object.hour != null) - message.hour = object.hour | 0; - if (object.minute != null) - message.minute = object.minute | 0; - if (object.date != null) { - if (typeof object.date !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.Period.Point.date: object expected"); - message.date = $root.google.type.Date.fromObject(object.date); - } - if (object.truncated != null) - message.truncated = Boolean(object.truncated); - return message; - }; + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {google.maps.places.v1.Place.OpeningHours.Period.Point} message Point - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Point.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.truncated = false; - object.date = null; - } - if (message.day != null && message.hasOwnProperty("day")) { - object.day = message.day; - if (options.oneofs) - object._day = "day"; - } - if (message.hour != null && message.hasOwnProperty("hour")) { - object.hour = message.hour; - if (options.oneofs) - object._hour = "hour"; - } - if (message.minute != null && message.hasOwnProperty("minute")) { - object.minute = message.minute; - if (options.oneofs) - object._minute = "minute"; - } - if (message.truncated != null && message.hasOwnProperty("truncated")) - object.truncated = message.truncated; - if (message.date != null && message.hasOwnProperty("date")) - object.date = $root.google.type.Date.toObject(message.date, options); - return object; - }; + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; - /** - * Converts this Point to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @instance - * @returns {Object.} JSON object - */ - Point.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; - /** - * Gets the default type url for Point - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.Period.Point - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.Period.Point"; - }; + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; - return Point; - })(); + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; - return Period; - })(); + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; - /** - * SecondaryHoursType enum. - * @name google.maps.places.v1.Place.OpeningHours.SecondaryHoursType - * @enum {number} - * @property {number} SECONDARY_HOURS_TYPE_UNSPECIFIED=0 SECONDARY_HOURS_TYPE_UNSPECIFIED value - * @property {number} DRIVE_THROUGH=1 DRIVE_THROUGH value - * @property {number} HAPPY_HOUR=2 HAPPY_HOUR value - * @property {number} DELIVERY=3 DELIVERY value - * @property {number} TAKEOUT=4 TAKEOUT value - * @property {number} KITCHEN=5 KITCHEN value - * @property {number} BREAKFAST=6 BREAKFAST value - * @property {number} LUNCH=7 LUNCH value - * @property {number} DINNER=8 DINNER value - * @property {number} BRUNCH=9 BRUNCH value - * @property {number} PICKUP=10 PICKUP value - * @property {number} ACCESS=11 ACCESS value - * @property {number} SENIOR_HOURS=12 SENIOR_HOURS value - * @property {number} ONLINE_SERVICE_HOURS=13 ONLINE_SERVICE_HOURS value - */ - OpeningHours.SecondaryHoursType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SECONDARY_HOURS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRIVE_THROUGH"] = 1; - values[valuesById[2] = "HAPPY_HOUR"] = 2; - values[valuesById[3] = "DELIVERY"] = 3; - values[valuesById[4] = "TAKEOUT"] = 4; - values[valuesById[5] = "KITCHEN"] = 5; - values[valuesById[6] = "BREAKFAST"] = 6; - values[valuesById[7] = "LUNCH"] = 7; - values[valuesById[8] = "DINNER"] = 8; - values[valuesById[9] = "BRUNCH"] = 9; - values[valuesById[10] = "PICKUP"] = 10; - values[valuesById[11] = "ACCESS"] = 11; - values[valuesById[12] = "SENIOR_HOURS"] = 12; - values[valuesById[13] = "ONLINE_SERVICE_HOURS"] = 13; - return values; - })(); + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; - OpeningHours.SpecialDay = (function() { + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; - /** - * Properties of a SpecialDay. - * @memberof google.maps.places.v1.Place.OpeningHours - * @interface ISpecialDay - * @property {google.type.IDate|null} [date] SpecialDay date - */ + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; - /** - * Constructs a new SpecialDay. - * @memberof google.maps.places.v1.Place.OpeningHours - * @classdesc Represents a SpecialDay. - * @implements ISpecialDay - * @constructor - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set - */ - function SpecialDay(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; - /** - * SpecialDay date. - * @member {google.type.IDate|null|undefined} date - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @instance - */ - SpecialDay.prototype.date = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new SpecialDay instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay instance - */ - SpecialDay.create = function create(properties) { - return new SpecialDay(properties); - }; + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecialDay.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.date != null && Object.hasOwnProperty.call(message, "date")) - $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; - /** - * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SpecialDay.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; - /** - * Decodes a SpecialDay message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecialDay.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.date = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SpecialDay message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SpecialDay.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a SpecialDay message. - * @function verify - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SpecialDay.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.date != null && message.hasOwnProperty("date")) { - var error = $root.google.type.Date.verify(message.date); - if (error) - return "date." + error; - } - return null; - }; + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; - /** - * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay - */ - SpecialDay.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.SpecialDay) - return object; - var message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); - if (object.date != null) { - if (typeof object.date !== "object") - throw TypeError(".google.maps.places.v1.Place.OpeningHours.SpecialDay.date: object expected"); - message.date = $root.google.type.Date.fromObject(object.date); - } - return message; - }; + return HttpRule; + })(); - /** - * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {google.maps.places.v1.Place.OpeningHours.SpecialDay} message SpecialDay - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SpecialDay.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.date = null; - if (message.date != null && message.hasOwnProperty("date")) - object.date = $root.google.type.Date.toObject(message.date, options); - return object; - }; + api.CustomHttpPattern = (function() { - /** - * Converts this SpecialDay to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @instance - * @returns {Object.} JSON object - */ - SpecialDay.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ - /** - * Gets the default type url for SpecialDay - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SpecialDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.SpecialDay"; - }; + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return SpecialDay; - })(); + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; - return OpeningHours; - })(); + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; - /** - * BusinessStatus enum. - * @name google.maps.places.v1.Place.BusinessStatus - * @enum {number} - * @property {number} BUSINESS_STATUS_UNSPECIFIED=0 BUSINESS_STATUS_UNSPECIFIED value - * @property {number} OPERATIONAL=1 OPERATIONAL value - * @property {number} CLOSED_TEMPORARILY=2 CLOSED_TEMPORARILY value - * @property {number} CLOSED_PERMANENTLY=3 CLOSED_PERMANENTLY value - */ - Place.BusinessStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BUSINESS_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPERATIONAL"] = 1; - values[valuesById[2] = "CLOSED_TEMPORARILY"] = 2; - values[valuesById[3] = "CLOSED_PERMANENTLY"] = 3; - return values; - })(); + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; - Place.Attribution = (function() { + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; - /** - * Properties of an Attribution. - * @memberof google.maps.places.v1.Place - * @interface IAttribution - * @property {string|null} [provider] Attribution provider - * @property {string|null} [providerUri] Attribution providerUri - */ + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new Attribution. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an Attribution. - * @implements IAttribution - * @constructor - * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set - */ - function Attribution(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Attribution provider. - * @member {string} provider - * @memberof google.maps.places.v1.Place.Attribution - * @instance - */ - Attribution.prototype.provider = ""; + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Attribution providerUri. - * @member {string} providerUri - * @memberof google.maps.places.v1.Place.Attribution - * @instance - */ - Attribution.prototype.providerUri = ""; + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; - /** - * Creates a new Attribution instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.Attribution} Attribution instance - */ - Attribution.create = function create(properties) { - return new Attribution(properties); - }; + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; - /** - * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); - if (message.providerUri != null && Object.hasOwnProperty.call(message, "providerUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerUri); - return writer; - }; + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; - /** - * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an Attribution message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.Attribution} Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Attribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.provider = reader.string(); - break; - } - case 2: { - message.providerUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; - /** - * Decodes an Attribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.Attribution} Attribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return CustomHttpPattern; + })(); - /** - * Verifies an Attribution message. - * @function verify - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Attribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - if (!$util.isString(message.provider)) - return "provider: string expected"; - if (message.providerUri != null && message.hasOwnProperty("providerUri")) - if (!$util.isString(message.providerUri)) - return "providerUri: string expected"; - return null; - }; + api.CommonLanguageSettings = (function() { - /** - * Creates an Attribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.Attribution} Attribution - */ - Attribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.Attribution) - return object; - var message = new $root.google.maps.places.v1.Place.Attribution(); - if (object.provider != null) - message.provider = String(object.provider); - if (object.providerUri != null) - message.providerUri = String(object.providerUri); - return message; - }; + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ - /** - * Creates a plain object from an Attribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {google.maps.places.v1.Place.Attribution} message Attribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Attribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.provider = ""; - object.providerUri = ""; - } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = message.provider; - if (message.providerUri != null && message.hasOwnProperty("providerUri")) - object.providerUri = message.providerUri; - return object; - }; + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; - /** - * Converts this Attribution to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.Attribution - * @instance - * @returns {Object.} JSON object - */ - Attribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; - /** - * Gets the default type url for Attribution - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.Attribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Attribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.Attribution"; - }; + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; - return Attribution; - })(); + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; - Place.PaymentOptions = (function() { + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a PaymentOptions. - * @memberof google.maps.places.v1.Place - * @interface IPaymentOptions - * @property {boolean|null} [acceptsCreditCards] PaymentOptions acceptsCreditCards - * @property {boolean|null} [acceptsDebitCards] PaymentOptions acceptsDebitCards - * @property {boolean|null} [acceptsCashOnly] PaymentOptions acceptsCashOnly - * @property {boolean|null} [acceptsNfc] PaymentOptions acceptsNfc - */ + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new PaymentOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a PaymentOptions. - * @implements IPaymentOptions - * @constructor - * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set - */ - function PaymentOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; } + } + return null; + }; - /** - * PaymentOptions acceptsCreditCards. - * @member {boolean|null|undefined} acceptsCreditCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsCreditCards = null; + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; - /** - * PaymentOptions acceptsDebitCards. - * @member {boolean|null|undefined} acceptsDebitCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsDebitCards = null; + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; - /** - * PaymentOptions acceptsCashOnly. - * @member {boolean|null|undefined} acceptsCashOnly - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsCashOnly = null; + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * PaymentOptions acceptsNfc. - * @member {boolean|null|undefined} acceptsNfc - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - PaymentOptions.prototype.acceptsNfc = null; + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return CommonLanguageSettings; + })(); - /** - * PaymentOptions _acceptsCreditCards. - * @member {"acceptsCreditCards"|undefined} _acceptsCreditCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsCreditCards", { - get: $util.oneOfGetter($oneOfFields = ["acceptsCreditCards"]), - set: $util.oneOfSetter($oneOfFields) - }); + api.ClientLibrarySettings = (function() { - /** - * PaymentOptions _acceptsDebitCards. - * @member {"acceptsDebitCards"|undefined} _acceptsDebitCards - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsDebitCards", { - get: $util.oneOfGetter($oneOfFields = ["acceptsDebitCards"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ - /** - * PaymentOptions _acceptsCashOnly. - * @member {"acceptsCashOnly"|undefined} _acceptsCashOnly - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsCashOnly", { - get: $util.oneOfGetter($oneOfFields = ["acceptsCashOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * PaymentOptions _acceptsNfc. - * @member {"acceptsNfc"|undefined} _acceptsNfc - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - */ - Object.defineProperty(PaymentOptions.prototype, "_acceptsNfc", { - get: $util.oneOfGetter($oneOfFields = ["acceptsNfc"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; - /** - * Creates a new PaymentOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions instance - */ - PaymentOptions.create = function create(properties) { - return new PaymentOptions(properties); - }; + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; - /** - * Encodes the specified PaymentOptions message. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceptsCreditCards != null && Object.hasOwnProperty.call(message, "acceptsCreditCards")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.acceptsCreditCards); - if (message.acceptsDebitCards != null && Object.hasOwnProperty.call(message, "acceptsDebitCards")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.acceptsDebitCards); - if (message.acceptsCashOnly != null && Object.hasOwnProperty.call(message, "acceptsCashOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.acceptsCashOnly); - if (message.acceptsNfc != null && Object.hasOwnProperty.call(message, "acceptsNfc")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.acceptsNfc); - return writer; - }; + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; - /** - * Encodes the specified PaymentOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PaymentOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.IPaymentOptions} message PaymentOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PaymentOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; - /** - * Decodes a PaymentOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PaymentOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceptsCreditCards = reader.bool(); - break; - } - case 2: { - message.acceptsDebitCards = reader.bool(); - break; - } - case 3: { - message.acceptsCashOnly = reader.bool(); - break; - } - case 4: { - message.acceptsNfc = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; - /** - * Decodes a PaymentOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PaymentOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; - /** - * Verifies a PaymentOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PaymentOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { - properties._acceptsCreditCards = 1; - if (typeof message.acceptsCreditCards !== "boolean") - return "acceptsCreditCards: boolean expected"; - } - if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { - properties._acceptsDebitCards = 1; - if (typeof message.acceptsDebitCards !== "boolean") - return "acceptsDebitCards: boolean expected"; - } - if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { - properties._acceptsCashOnly = 1; - if (typeof message.acceptsCashOnly !== "boolean") - return "acceptsCashOnly: boolean expected"; - } - if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { - properties._acceptsNfc = 1; - if (typeof message.acceptsNfc !== "boolean") - return "acceptsNfc: boolean expected"; - } - return null; - }; + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; - /** - * Creates a PaymentOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.PaymentOptions} PaymentOptions - */ - PaymentOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.PaymentOptions) - return object; - var message = new $root.google.maps.places.v1.Place.PaymentOptions(); - if (object.acceptsCreditCards != null) - message.acceptsCreditCards = Boolean(object.acceptsCreditCards); - if (object.acceptsDebitCards != null) - message.acceptsDebitCards = Boolean(object.acceptsDebitCards); - if (object.acceptsCashOnly != null) - message.acceptsCashOnly = Boolean(object.acceptsCashOnly); - if (object.acceptsNfc != null) - message.acceptsNfc = Boolean(object.acceptsNfc); - return message; - }; + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; - /** - * Creates a plain object from a PaymentOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {google.maps.places.v1.Place.PaymentOptions} message PaymentOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PaymentOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.acceptsCreditCards != null && message.hasOwnProperty("acceptsCreditCards")) { - object.acceptsCreditCards = message.acceptsCreditCards; - if (options.oneofs) - object._acceptsCreditCards = "acceptsCreditCards"; - } - if (message.acceptsDebitCards != null && message.hasOwnProperty("acceptsDebitCards")) { - object.acceptsDebitCards = message.acceptsDebitCards; - if (options.oneofs) - object._acceptsDebitCards = "acceptsDebitCards"; - } - if (message.acceptsCashOnly != null && message.hasOwnProperty("acceptsCashOnly")) { - object.acceptsCashOnly = message.acceptsCashOnly; - if (options.oneofs) - object._acceptsCashOnly = "acceptsCashOnly"; - } - if (message.acceptsNfc != null && message.hasOwnProperty("acceptsNfc")) { - object.acceptsNfc = message.acceptsNfc; - if (options.oneofs) - object._acceptsNfc = "acceptsNfc"; - } - return object; - }; + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; - /** - * Converts this PaymentOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.PaymentOptions - * @instance - * @returns {Object.} JSON object - */ - PaymentOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; - /** - * Gets the default type url for PaymentOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.PaymentOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PaymentOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.PaymentOptions"; - }; + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; - return PaymentOptions; - })(); + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; - Place.ParkingOptions = (function() { + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a ParkingOptions. - * @memberof google.maps.places.v1.Place - * @interface IParkingOptions - * @property {boolean|null} [freeParkingLot] ParkingOptions freeParkingLot - * @property {boolean|null} [paidParkingLot] ParkingOptions paidParkingLot - * @property {boolean|null} [freeStreetParking] ParkingOptions freeStreetParking - * @property {boolean|null} [paidStreetParking] ParkingOptions paidStreetParking - * @property {boolean|null} [valetParking] ParkingOptions valetParking - * @property {boolean|null} [freeGarageParking] ParkingOptions freeGarageParking - * @property {boolean|null} [paidGarageParking] ParkingOptions paidGarageParking - */ + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; - /** - * Constructs a new ParkingOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a ParkingOptions. - * @implements IParkingOptions - * @constructor - * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set - */ - function ParkingOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ParkingOptions freeParkingLot. - * @member {boolean|null|undefined} freeParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeParkingLot = null; + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; - /** - * ParkingOptions paidParkingLot. - * @member {boolean|null|undefined} paidParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidParkingLot = null; + return ClientLibrarySettings; + })(); - /** - * ParkingOptions freeStreetParking. - * @member {boolean|null|undefined} freeStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeStreetParking = null; + api.Publishing = (function() { - /** - * ParkingOptions paidStreetParking. - * @member {boolean|null|undefined} paidStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidStreetParking = null; + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + */ - /** - * ParkingOptions valetParking. - * @member {boolean|null|undefined} valetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.valetParking = null; + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * ParkingOptions freeGarageParking. - * @member {boolean|null|undefined} freeGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.freeGarageParking = null; + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; - /** - * ParkingOptions paidGarageParking. - * @member {boolean|null|undefined} paidGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - ParkingOptions.prototype.paidGarageParking = null; + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; - /** - * ParkingOptions _freeParkingLot. - * @member {"freeParkingLot"|undefined} _freeParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeParkingLot", { - get: $util.oneOfGetter($oneOfFields = ["freeParkingLot"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; - /** - * ParkingOptions _paidParkingLot. - * @member {"paidParkingLot"|undefined} _paidParkingLot - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidParkingLot", { - get: $util.oneOfGetter($oneOfFields = ["paidParkingLot"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; - /** - * ParkingOptions _freeStreetParking. - * @member {"freeStreetParking"|undefined} _freeStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeStreetParking", { - get: $util.oneOfGetter($oneOfFields = ["freeStreetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - /** - * ParkingOptions _paidStreetParking. - * @member {"paidStreetParking"|undefined} _paidStreetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidStreetParking", { - get: $util.oneOfGetter($oneOfFields = ["paidStreetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; - /** - * ParkingOptions _valetParking. - * @member {"valetParking"|undefined} _valetParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_valetParking", { - get: $util.oneOfGetter($oneOfFields = ["valetParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; - /** - * ParkingOptions _freeGarageParking. - * @member {"freeGarageParking"|undefined} _freeGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_freeGarageParking", { - get: $util.oneOfGetter($oneOfFields = ["freeGarageParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; - /** - * ParkingOptions _paidGarageParking. - * @member {"paidGarageParking"|undefined} _paidGarageParking - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - */ - Object.defineProperty(ParkingOptions.prototype, "_paidGarageParking", { - get: $util.oneOfGetter($oneOfFields = ["paidGarageParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; - /** - * Creates a new ParkingOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions instance - */ - ParkingOptions.create = function create(properties) { - return new ParkingOptions(properties); - }; + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; - /** - * Encodes the specified ParkingOptions message. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParkingOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.freeParkingLot != null && Object.hasOwnProperty.call(message, "freeParkingLot")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.freeParkingLot); - if (message.paidParkingLot != null && Object.hasOwnProperty.call(message, "paidParkingLot")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paidParkingLot); - if (message.freeStreetParking != null && Object.hasOwnProperty.call(message, "freeStreetParking")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.freeStreetParking); - if (message.paidStreetParking != null && Object.hasOwnProperty.call(message, "paidStreetParking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.paidStreetParking); - if (message.valetParking != null && Object.hasOwnProperty.call(message, "valetParking")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.valetParking); - if (message.freeGarageParking != null && Object.hasOwnProperty.call(message, "freeGarageParking")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.freeGarageParking); - if (message.paidGarageParking != null && Object.hasOwnProperty.call(message, "paidGarageParking")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.paidGarageParking); - return writer; - }; + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + return writer; + }; - /** - * Encodes the specified ParkingOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ParkingOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.IParkingOptions} message ParkingOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParkingOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ParkingOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParkingOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ParkingOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.freeParkingLot = reader.bool(); - break; - } - case 2: { - message.paidParkingLot = reader.bool(); - break; - } - case 3: { - message.freeStreetParking = reader.bool(); - break; - } - case 4: { - message.paidStreetParking = reader.bool(); - break; - } - case 5: { - message.valetParking = reader.bool(); - break; - } - case 6: { - message.freeGarageParking = reader.bool(); - break; - } - case 7: { - message.paidGarageParking = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a ParkingOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParkingOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ParkingOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParkingOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { - properties._freeParkingLot = 1; - if (typeof message.freeParkingLot !== "boolean") - return "freeParkingLot: boolean expected"; - } - if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { - properties._paidParkingLot = 1; - if (typeof message.paidParkingLot !== "boolean") - return "paidParkingLot: boolean expected"; - } - if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { - properties._freeStreetParking = 1; - if (typeof message.freeStreetParking !== "boolean") - return "freeStreetParking: boolean expected"; - } - if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { - properties._paidStreetParking = 1; - if (typeof message.paidStreetParking !== "boolean") - return "paidStreetParking: boolean expected"; - } - if (message.valetParking != null && message.hasOwnProperty("valetParking")) { - properties._valetParking = 1; - if (typeof message.valetParking !== "boolean") - return "valetParking: boolean expected"; - } - if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { - properties._freeGarageParking = 1; - if (typeof message.freeGarageParking !== "boolean") - return "freeGarageParking: boolean expected"; - } - if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { - properties._paidGarageParking = 1; - if (typeof message.paidGarageParking !== "boolean") - return "paidGarageParking: boolean expected"; - } - return null; - }; + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + return null; + }; - /** - * Creates a ParkingOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.ParkingOptions} ParkingOptions - */ - ParkingOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.ParkingOptions) - return object; - var message = new $root.google.maps.places.v1.Place.ParkingOptions(); - if (object.freeParkingLot != null) - message.freeParkingLot = Boolean(object.freeParkingLot); - if (object.paidParkingLot != null) - message.paidParkingLot = Boolean(object.paidParkingLot); - if (object.freeStreetParking != null) - message.freeStreetParking = Boolean(object.freeStreetParking); - if (object.paidStreetParking != null) - message.paidStreetParking = Boolean(object.paidStreetParking); - if (object.valetParking != null) - message.valetParking = Boolean(object.valetParking); - if (object.freeGarageParking != null) - message.freeGarageParking = Boolean(object.freeGarageParking); - if (object.paidGarageParking != null) - message.paidGarageParking = Boolean(object.paidGarageParking); - return message; - }; + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + return message; + }; - /** - * Creates a plain object from a ParkingOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {google.maps.places.v1.Place.ParkingOptions} message ParkingOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParkingOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.freeParkingLot != null && message.hasOwnProperty("freeParkingLot")) { - object.freeParkingLot = message.freeParkingLot; - if (options.oneofs) - object._freeParkingLot = "freeParkingLot"; - } - if (message.paidParkingLot != null && message.hasOwnProperty("paidParkingLot")) { - object.paidParkingLot = message.paidParkingLot; - if (options.oneofs) - object._paidParkingLot = "paidParkingLot"; - } - if (message.freeStreetParking != null && message.hasOwnProperty("freeStreetParking")) { - object.freeStreetParking = message.freeStreetParking; - if (options.oneofs) - object._freeStreetParking = "freeStreetParking"; - } - if (message.paidStreetParking != null && message.hasOwnProperty("paidStreetParking")) { - object.paidStreetParking = message.paidStreetParking; - if (options.oneofs) - object._paidStreetParking = "paidStreetParking"; - } - if (message.valetParking != null && message.hasOwnProperty("valetParking")) { - object.valetParking = message.valetParking; - if (options.oneofs) - object._valetParking = "valetParking"; - } - if (message.freeGarageParking != null && message.hasOwnProperty("freeGarageParking")) { - object.freeGarageParking = message.freeGarageParking; - if (options.oneofs) - object._freeGarageParking = "freeGarageParking"; - } - if (message.paidGarageParking != null && message.hasOwnProperty("paidGarageParking")) { - object.paidGarageParking = message.paidGarageParking; - if (options.oneofs) - object._paidGarageParking = "paidGarageParking"; - } - return object; - }; + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + return object; + }; - /** - * Converts this ParkingOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.ParkingOptions - * @instance - * @returns {Object.} JSON object - */ - ParkingOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ParkingOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.ParkingOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ParkingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.ParkingOptions"; - }; + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; - return ParkingOptions; - })(); + return Publishing; + })(); - Place.SubDestination = (function() { + api.JavaSettings = (function() { - /** - * Properties of a SubDestination. - * @memberof google.maps.places.v1.Place - * @interface ISubDestination - * @property {string|null} [name] SubDestination name - * @property {string|null} [id] SubDestination id - */ + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ - /** - * Constructs a new SubDestination. - * @memberof google.maps.places.v1.Place - * @classdesc Represents a SubDestination. - * @implements ISubDestination - * @constructor - * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set - */ - function SubDestination(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SubDestination name. - * @member {string} name - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - */ - SubDestination.prototype.name = ""; + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; - /** - * SubDestination id. - * @member {string} id - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - */ - SubDestination.prototype.id = ""; + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; - /** - * Creates a new SubDestination instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination instance - */ - SubDestination.create = function create(properties) { - return new SubDestination(properties); - }; + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; - /** - * Encodes the specified SubDestination message. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - return writer; - }; + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; - /** - * Encodes the specified SubDestination message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.SubDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.ISubDestination} message SubDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes a SubDestination message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.SubDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.id = reader.string(); - break; - } + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; default: - reader.skipType(tag & 7); + reader.skipType(tag2 & 7); break; } } - return message; - }; - - /** - * Decodes a SubDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SubDestination message. - * @function verify - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SubDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - return null; - }; + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a SubDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.SubDestination} SubDestination - */ - SubDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.SubDestination) - return object; - var message = new $root.google.maps.places.v1.Place.SubDestination(); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - return message; - }; + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a SubDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {google.maps.places.v1.Place.SubDestination} message SubDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SubDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.id = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - return object; - }; + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; - /** - * Converts this SubDestination to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.SubDestination - * @instance - * @returns {Object.} JSON object - */ - SubDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; - /** - * Gets the default type url for SubDestination - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.SubDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SubDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.SubDestination"; - }; + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - return SubDestination; - })(); + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Place.AccessibilityOptions = (function() { + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; - /** - * Properties of an AccessibilityOptions. - * @memberof google.maps.places.v1.Place - * @interface IAccessibilityOptions - * @property {boolean|null} [wheelchairAccessibleParking] AccessibilityOptions wheelchairAccessibleParking - * @property {boolean|null} [wheelchairAccessibleEntrance] AccessibilityOptions wheelchairAccessibleEntrance - * @property {boolean|null} [wheelchairAccessibleRestroom] AccessibilityOptions wheelchairAccessibleRestroom - * @property {boolean|null} [wheelchairAccessibleSeating] AccessibilityOptions wheelchairAccessibleSeating - */ + return JavaSettings; + })(); - /** - * Constructs a new AccessibilityOptions. - * @memberof google.maps.places.v1.Place - * @classdesc Represents an AccessibilityOptions. - * @implements IAccessibilityOptions - * @constructor - * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set - */ - function AccessibilityOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + api.CppSettings = (function() { - /** - * AccessibilityOptions wheelchairAccessibleParking. - * @member {boolean|null|undefined} wheelchairAccessibleParking - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleParking = null; + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ - /** - * AccessibilityOptions wheelchairAccessibleEntrance. - * @member {boolean|null|undefined} wheelchairAccessibleEntrance - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleEntrance = null; + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AccessibilityOptions wheelchairAccessibleRestroom. - * @member {boolean|null|undefined} wheelchairAccessibleRestroom - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleRestroom = null; + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; - /** - * AccessibilityOptions wheelchairAccessibleSeating. - * @member {boolean|null|undefined} wheelchairAccessibleSeating - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - AccessibilityOptions.prototype.wheelchairAccessibleSeating = null; + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * AccessibilityOptions _wheelchairAccessibleParking. - * @member {"wheelchairAccessibleParking"|undefined} _wheelchairAccessibleParking - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleParking", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleParking"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * AccessibilityOptions _wheelchairAccessibleEntrance. - * @member {"wheelchairAccessibleEntrance"|undefined} _wheelchairAccessibleEntrance - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleEntrance", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleEntrance"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * AccessibilityOptions _wheelchairAccessibleRestroom. - * @member {"wheelchairAccessibleRestroom"|undefined} _wheelchairAccessibleRestroom - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleRestroom", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleRestroom"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * AccessibilityOptions _wheelchairAccessibleSeating. - * @member {"wheelchairAccessibleSeating"|undefined} _wheelchairAccessibleSeating - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - */ - Object.defineProperty(AccessibilityOptions.prototype, "_wheelchairAccessibleSeating", { - get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleSeating"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; - /** - * Creates a new AccessibilityOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions instance - */ - AccessibilityOptions.create = function create(properties) { - return new AccessibilityOptions(properties); - }; + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; - /** - * Encodes the specified AccessibilityOptions message. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessibilityOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.wheelchairAccessibleParking != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleParking")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.wheelchairAccessibleParking); - if (message.wheelchairAccessibleEntrance != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleEntrance")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.wheelchairAccessibleEntrance); - if (message.wheelchairAccessibleRestroom != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleRestroom")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.wheelchairAccessibleRestroom); - if (message.wheelchairAccessibleSeating != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleSeating")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.wheelchairAccessibleSeating); - return writer; - }; + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Encodes the specified AccessibilityOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AccessibilityOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.IAccessibilityOptions} message AccessibilityOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessibilityOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessibilityOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.wheelchairAccessibleParking = reader.bool(); - break; - } - case 2: { - message.wheelchairAccessibleEntrance = reader.bool(); - break; - } - case 3: { - message.wheelchairAccessibleRestroom = reader.bool(); - break; - } - case 4: { - message.wheelchairAccessibleSeating = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; - /** - * Decodes an AccessibilityOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessibilityOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return CppSettings; + })(); - /** - * Verifies an AccessibilityOptions message. - * @function verify - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessibilityOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { - properties._wheelchairAccessibleParking = 1; - if (typeof message.wheelchairAccessibleParking !== "boolean") - return "wheelchairAccessibleParking: boolean expected"; - } - if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { - properties._wheelchairAccessibleEntrance = 1; - if (typeof message.wheelchairAccessibleEntrance !== "boolean") - return "wheelchairAccessibleEntrance: boolean expected"; - } - if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { - properties._wheelchairAccessibleRestroom = 1; - if (typeof message.wheelchairAccessibleRestroom !== "boolean") - return "wheelchairAccessibleRestroom: boolean expected"; - } - if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { - properties._wheelchairAccessibleSeating = 1; - if (typeof message.wheelchairAccessibleSeating !== "boolean") - return "wheelchairAccessibleSeating: boolean expected"; - } - return null; - }; + api.PhpSettings = (function() { - /** - * Creates an AccessibilityOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Place.AccessibilityOptions} AccessibilityOptions - */ - AccessibilityOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Place.AccessibilityOptions) - return object; - var message = new $root.google.maps.places.v1.Place.AccessibilityOptions(); - if (object.wheelchairAccessibleParking != null) - message.wheelchairAccessibleParking = Boolean(object.wheelchairAccessibleParking); - if (object.wheelchairAccessibleEntrance != null) - message.wheelchairAccessibleEntrance = Boolean(object.wheelchairAccessibleEntrance); - if (object.wheelchairAccessibleRestroom != null) - message.wheelchairAccessibleRestroom = Boolean(object.wheelchairAccessibleRestroom); - if (object.wheelchairAccessibleSeating != null) - message.wheelchairAccessibleSeating = Boolean(object.wheelchairAccessibleSeating); - return message; - }; + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ - /** - * Creates a plain object from an AccessibilityOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {google.maps.places.v1.Place.AccessibilityOptions} message AccessibilityOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessibilityOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.wheelchairAccessibleParking != null && message.hasOwnProperty("wheelchairAccessibleParking")) { - object.wheelchairAccessibleParking = message.wheelchairAccessibleParking; - if (options.oneofs) - object._wheelchairAccessibleParking = "wheelchairAccessibleParking"; - } - if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { - object.wheelchairAccessibleEntrance = message.wheelchairAccessibleEntrance; - if (options.oneofs) - object._wheelchairAccessibleEntrance = "wheelchairAccessibleEntrance"; - } - if (message.wheelchairAccessibleRestroom != null && message.hasOwnProperty("wheelchairAccessibleRestroom")) { - object.wheelchairAccessibleRestroom = message.wheelchairAccessibleRestroom; - if (options.oneofs) - object._wheelchairAccessibleRestroom = "wheelchairAccessibleRestroom"; - } - if (message.wheelchairAccessibleSeating != null && message.hasOwnProperty("wheelchairAccessibleSeating")) { - object.wheelchairAccessibleSeating = message.wheelchairAccessibleSeating; - if (options.oneofs) - object._wheelchairAccessibleSeating = "wheelchairAccessibleSeating"; - } - return object; - }; + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Converts this AccessibilityOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @instance - * @returns {Object.} JSON object - */ - AccessibilityOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; - /** - * Gets the default type url for AccessibilityOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.Place.AccessibilityOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessibilityOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Place.AccessibilityOptions"; - }; + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; - return AccessibilityOptions; - })(); + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - return Place; - })(); + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * PriceLevel enum. - * @name google.maps.places.v1.PriceLevel - * @enum {number} - * @property {number} PRICE_LEVEL_UNSPECIFIED=0 PRICE_LEVEL_UNSPECIFIED value - * @property {number} PRICE_LEVEL_FREE=1 PRICE_LEVEL_FREE value - * @property {number} PRICE_LEVEL_INEXPENSIVE=2 PRICE_LEVEL_INEXPENSIVE value - * @property {number} PRICE_LEVEL_MODERATE=3 PRICE_LEVEL_MODERATE value - * @property {number} PRICE_LEVEL_EXPENSIVE=4 PRICE_LEVEL_EXPENSIVE value - * @property {number} PRICE_LEVEL_VERY_EXPENSIVE=5 PRICE_LEVEL_VERY_EXPENSIVE value - */ - v1.PriceLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRICE_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRICE_LEVEL_FREE"] = 1; - values[valuesById[2] = "PRICE_LEVEL_INEXPENSIVE"] = 2; - values[valuesById[3] = "PRICE_LEVEL_MODERATE"] = 3; - values[valuesById[4] = "PRICE_LEVEL_EXPENSIVE"] = 4; - values[valuesById[5] = "PRICE_LEVEL_VERY_EXPENSIVE"] = 5; - return values; - })(); + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - v1.Review = (function() { + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; - /** - * Properties of a Review. - * @memberof google.maps.places.v1 - * @interface IReview - * @property {string|null} [name] Review name - * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription - * @property {google.type.ILocalizedText|null} [text] Review text - * @property {google.type.ILocalizedText|null} [originalText] Review originalText - * @property {number|null} [rating] Review rating - * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution - * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime - */ + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; - /** - * Constructs a new Review. - * @memberof google.maps.places.v1 - * @classdesc Represents a Review. - * @implements IReview - * @constructor - * @param {google.maps.places.v1.IReview=} [properties] Properties to set - */ - function Review(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Review name. - * @member {string} name - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.name = ""; + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Review relativePublishTimeDescription. - * @member {string} relativePublishTimeDescription - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.relativePublishTimeDescription = ""; + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; - /** - * Review text. - * @member {google.type.ILocalizedText|null|undefined} text - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.text = null; + return PhpSettings; + })(); - /** - * Review originalText. - * @member {google.type.ILocalizedText|null|undefined} originalText - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.originalText = null; + api.PythonSettings = (function() { - /** - * Review rating. - * @member {number} rating - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.rating = 0; + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ - /** - * Review authorAttribution. - * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.authorAttribution = null; + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Review publishTime. - * @member {google.protobuf.ITimestamp|null|undefined} publishTime - * @memberof google.maps.places.v1.Review - * @instance - */ - Review.prototype.publishTime = null; + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; - /** - * Creates a new Review instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview=} [properties] Properties to set - * @returns {google.maps.places.v1.Review} Review instance - */ - Review.create = function create(properties) { - return new Review(properties); - }; + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; - /** - * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview} message Review message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Review.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription); - if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) - writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText")) - $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution")) - $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) - $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.IReview} message Review message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Review.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Review message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.Review - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.Review} Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Review.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.relativePublishTimeDescription = reader.string(); - break; - } - case 9: { - message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 12: { - message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32()); - break; - } - case 7: { - message.rating = reader.double(); - break; - } - case 13: { - message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()); - break; - } - case 14: { - message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Review message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.Review - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.Review} Review - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Review.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Review message. - * @function verify - * @memberof google.maps.places.v1.Review - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Review.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) - if (!$util.isString(message.relativePublishTimeDescription)) - return "relativePublishTimeDescription: string expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.type.LocalizedText.verify(message.text); - if (error) - return "text." + error; - } - if (message.originalText != null && message.hasOwnProperty("originalText")) { - var error = $root.google.type.LocalizedText.verify(message.originalText); - if (error) - return "originalText." + error; - } - if (message.rating != null && message.hasOwnProperty("rating")) - if (typeof message.rating !== "number") - return "rating: number expected"; - if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) { - var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution); - if (error) - return "authorAttribution." + error; - } - if (message.publishTime != null && message.hasOwnProperty("publishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.publishTime); - if (error) - return "publishTime." + error; - } - return null; - }; + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Creates a Review message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.Review - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.Review} Review - */ - Review.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.Review) - return object; - var message = new $root.google.maps.places.v1.Review(); - if (object.name != null) - message.name = String(object.name); - if (object.relativePublishTimeDescription != null) - message.relativePublishTimeDescription = String(object.relativePublishTimeDescription); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.Review.text: object expected"); - message.text = $root.google.type.LocalizedText.fromObject(object.text); - } - if (object.originalText != null) { - if (typeof object.originalText !== "object") - throw TypeError(".google.maps.places.v1.Review.originalText: object expected"); - message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText); - } - if (object.rating != null) - message.rating = Number(object.rating); - if (object.authorAttribution != null) { - if (typeof object.authorAttribution !== "object") - throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected"); - message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution); - } - if (object.publishTime != null) { - if (typeof object.publishTime !== "object") - throw TypeError(".google.maps.places.v1.Review.publishTime: object expected"); - message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime); - } - return message; - }; + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a Review message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.Review - * @static - * @param {google.maps.places.v1.Review} message Review - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Review.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.relativePublishTimeDescription = ""; - object.rating = 0; - object.text = null; - object.originalText = null; - object.authorAttribution = null; - object.publishTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) - object.relativePublishTimeDescription = message.relativePublishTimeDescription; - if (message.rating != null && message.hasOwnProperty("rating")) - object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.type.LocalizedText.toObject(message.text, options); - if (message.originalText != null && message.hasOwnProperty("originalText")) - object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options); - if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) - object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options); - if (message.publishTime != null && message.hasOwnProperty("publishTime")) - object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options); - return object; - }; + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; - /** - * Converts this Review to JSON. - * @function toJSON - * @memberof google.maps.places.v1.Review - * @instance - * @returns {Object.} JSON object - */ - Review.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return PythonSettings; + })(); - /** - * Gets the default type url for Review - * @function getTypeUrl - * @memberof google.maps.places.v1.Review - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.Review"; - }; + api.NodeSettings = (function() { - return Review; - })(); + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ - v1.Places = (function() { + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Places service. - * @memberof google.maps.places.v1 - * @classdesc Represents a Places - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Places(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; - (Places.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Places; + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; - /** - * Creates new Places service using the specified rpc implementation. - * @function create - * @memberof google.maps.places.v1.Places - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Places} RPC service. Useful where requests and/or responses are streamed. - */ - Places.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Callback as used by {@link google.maps.places.v1.Places|searchNearby}. - * @memberof google.maps.places.v1.Places - * @typedef SearchNearbyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.SearchNearbyResponse} [response] SearchNearbyResponse - */ + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls SearchNearby. - * @function searchNearby - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object - * @param {google.maps.places.v1.Places.SearchNearbyCallback} callback Node-style callback called with the error, if any, and SearchNearbyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.searchNearby = function searchNearby(request, callback) { - return this.rpcCall(searchNearby, $root.google.maps.places.v1.SearchNearbyRequest, $root.google.maps.places.v1.SearchNearbyResponse, request, callback); - }, "name", { value: "SearchNearby" }); + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls SearchNearby. - * @function searchNearby - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchNearbyRequest} request SearchNearbyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.maps.places.v1.Places|searchText}. - * @memberof google.maps.places.v1.Places - * @typedef SearchTextCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.SearchTextResponse} [response] SearchTextResponse - */ + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; - /** - * Calls SearchText. - * @function searchText - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object - * @param {google.maps.places.v1.Places.SearchTextCallback} callback Node-style callback called with the error, if any, and SearchTextResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.searchText = function searchText(request, callback) { - return this.rpcCall(searchText, $root.google.maps.places.v1.SearchTextRequest, $root.google.maps.places.v1.SearchTextResponse, request, callback); - }, "name", { value: "SearchText" }); + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; - /** - * Calls SearchText. - * @function searchText - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Callback as used by {@link google.maps.places.v1.Places|getPhotoMedia}. - * @memberof google.maps.places.v1.Places - * @typedef GetPhotoMediaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.PhotoMedia} [response] PhotoMedia - */ + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetPhotoMedia. - * @function getPhotoMedia - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object - * @param {google.maps.places.v1.Places.GetPhotoMediaCallback} callback Node-style callback called with the error, if any, and PhotoMedia - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.getPhotoMedia = function getPhotoMedia(request, callback) { - return this.rpcCall(getPhotoMedia, $root.google.maps.places.v1.GetPhotoMediaRequest, $root.google.maps.places.v1.PhotoMedia, request, callback); - }, "name", { value: "GetPhotoMedia" }); + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; - /** - * Calls GetPhotoMedia. - * @function getPhotoMedia - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPhotoMediaRequest} request GetPhotoMediaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return NodeSettings; + })(); - /** - * Callback as used by {@link google.maps.places.v1.Places|getPlace}. - * @memberof google.maps.places.v1.Places - * @typedef GetPlaceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.Place} [response] Place - */ + api.DotnetSettings = (function() { - /** - * Calls GetPlace. - * @function getPlace - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object - * @param {google.maps.places.v1.Places.GetPlaceCallback} callback Node-style callback called with the error, if any, and Place - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.getPlace = function getPlace(request, callback) { - return this.rpcCall(getPlace, $root.google.maps.places.v1.GetPlaceRequest, $root.google.maps.places.v1.Place, request, callback); - }, "name", { value: "GetPlace" }); + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ - /** - * Calls GetPlace. - * @function getPlace - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IGetPlaceRequest} request GetPlaceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}. - * @memberof google.maps.places.v1.Places - * @typedef AutocompletePlacesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.maps.places.v1.AutocompletePlacesResponse} [response] AutocompletePlacesResponse - */ + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; - /** - * Calls AutocompletePlaces. - * @function autocompletePlaces - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object - * @param {google.maps.places.v1.Places.AutocompletePlacesCallback} callback Node-style callback called with the error, if any, and AutocompletePlacesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Places.prototype.autocompletePlaces = function autocompletePlaces(request, callback) { - return this.rpcCall(autocompletePlaces, $root.google.maps.places.v1.AutocompletePlacesRequest, $root.google.maps.places.v1.AutocompletePlacesResponse, request, callback); - }, "name", { value: "AutocompletePlaces" }); + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; - /** - * Calls AutocompletePlaces. - * @function autocompletePlaces - * @memberof google.maps.places.v1.Places - * @instance - * @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; - return Places; - })(); + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; - v1.SearchNearbyRequest = (function() { + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - /** - * Properties of a SearchNearbyRequest. - * @memberof google.maps.places.v1 - * @interface ISearchNearbyRequest - * @property {string|null} [languageCode] SearchNearbyRequest languageCode - * @property {string|null} [regionCode] SearchNearbyRequest regionCode - * @property {Array.|null} [includedTypes] SearchNearbyRequest includedTypes - * @property {Array.|null} [excludedTypes] SearchNearbyRequest excludedTypes - * @property {Array.|null} [includedPrimaryTypes] SearchNearbyRequest includedPrimaryTypes - * @property {Array.|null} [excludedPrimaryTypes] SearchNearbyRequest excludedPrimaryTypes - * @property {number|null} [maxResultCount] SearchNearbyRequest maxResultCount - * @property {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null} [locationRestriction] SearchNearbyRequest locationRestriction - * @property {google.maps.places.v1.SearchNearbyRequest.RankPreference|null} [rankPreference] SearchNearbyRequest rankPreference - */ + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - /** - * Constructs a new SearchNearbyRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchNearbyRequest. - * @implements ISearchNearbyRequest - * @constructor - * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set - */ - function SearchNearbyRequest(properties) { - this.includedTypes = []; - this.excludedTypes = []; - this.includedPrimaryTypes = []; - this.excludedPrimaryTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; - /** - * SearchNearbyRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.languageCode = ""; + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; - /** - * SearchNearbyRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.regionCode = ""; + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SearchNearbyRequest includedTypes. - * @member {Array.} includedTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.includedTypes = $util.emptyArray; + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * SearchNearbyRequest excludedTypes. - * @member {Array.} excludedTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.excludedTypes = $util.emptyArray; + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * SearchNearbyRequest includedPrimaryTypes. - * @member {Array.} includedPrimaryTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.includedPrimaryTypes = $util.emptyArray; + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; - /** - * SearchNearbyRequest excludedPrimaryTypes. - * @member {Array.} excludedPrimaryTypes - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.excludedPrimaryTypes = $util.emptyArray; + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; - /** - * SearchNearbyRequest maxResultCount. - * @member {number} maxResultCount - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.maxResultCount = 0; + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; - /** - * SearchNearbyRequest locationRestriction. - * @member {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.locationRestriction = null; + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; - /** - * SearchNearbyRequest rankPreference. - * @member {google.maps.places.v1.SearchNearbyRequest.RankPreference} rankPreference - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - */ - SearchNearbyRequest.prototype.rankPreference = 0; + return DotnetSettings; + })(); - /** - * Creates a new SearchNearbyRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest instance - */ - SearchNearbyRequest.create = function create(properties) { - return new SearchNearbyRequest(properties); - }; + api.RubySettings = (function() { - /** - * Encodes the specified SearchNearbyRequest message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); - if (message.includedTypes != null && message.includedTypes.length) - for (var i = 0; i < message.includedTypes.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.includedTypes[i]); - if (message.excludedTypes != null && message.excludedTypes.length) - for (var i = 0; i < message.excludedTypes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedTypes[i]); - if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedPrimaryTypes[i]); - if (message.excludedPrimaryTypes != null && message.excludedPrimaryTypes.length) - for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.excludedPrimaryTypes[i]); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxResultCount); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rankPreference); - return writer; - }; + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ - /** - * Encodes the specified SearchNearbyRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.ISearchNearbyRequest} message SearchNearbyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.languageCode = reader.string(); - break; - } - case 2: { - message.regionCode = reader.string(); - break; - } - case 3: { - if (!(message.includedTypes && message.includedTypes.length)) - message.includedTypes = []; - message.includedTypes.push(reader.string()); - break; - } - case 4: { - if (!(message.excludedTypes && message.excludedTypes.length)) - message.excludedTypes = []; - message.excludedTypes.push(reader.string()); - break; - } - case 5: { - if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) - message.includedPrimaryTypes = []; - message.includedPrimaryTypes.push(reader.string()); - break; - } - case 6: { - if (!(message.excludedPrimaryTypes && message.excludedPrimaryTypes.length)) - message.excludedPrimaryTypes = []; - message.excludedPrimaryTypes.push(reader.string()); - break; - } - case 7: { - message.maxResultCount = reader.int32(); - break; - } - case 8: { - message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 9: { - message.rankPreference = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; - /** - * Decodes a SearchNearbyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; - /** - * Verifies a SearchNearbyRequest message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchNearbyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.includedTypes != null && message.hasOwnProperty("includedTypes")) { - if (!Array.isArray(message.includedTypes)) - return "includedTypes: array expected"; - for (var i = 0; i < message.includedTypes.length; ++i) - if (!$util.isString(message.includedTypes[i])) - return "includedTypes: string[] expected"; - } - if (message.excludedTypes != null && message.hasOwnProperty("excludedTypes")) { - if (!Array.isArray(message.excludedTypes)) - return "excludedTypes: array expected"; - for (var i = 0; i < message.excludedTypes.length; ++i) - if (!$util.isString(message.excludedTypes[i])) - return "excludedTypes: string[] expected"; - } - if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { - if (!Array.isArray(message.includedPrimaryTypes)) - return "includedPrimaryTypes: array expected"; - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - if (!$util.isString(message.includedPrimaryTypes[i])) - return "includedPrimaryTypes: string[] expected"; - } - if (message.excludedPrimaryTypes != null && message.hasOwnProperty("excludedPrimaryTypes")) { - if (!Array.isArray(message.excludedPrimaryTypes)) - return "excludedPrimaryTypes: array expected"; - for (var i = 0; i < message.excludedPrimaryTypes.length; ++i) - if (!$util.isString(message.excludedPrimaryTypes[i])) - return "excludedPrimaryTypes: string[] expected"; - } - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - switch (message.rankPreference) { - default: - return "rankPreference: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a SearchNearbyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyRequest} SearchNearbyRequest - */ - SearchNearbyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyRequest(); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.includedTypes) { - if (!Array.isArray(object.includedTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedTypes: array expected"); - message.includedTypes = []; - for (var i = 0; i < object.includedTypes.length; ++i) - message.includedTypes[i] = String(object.includedTypes[i]); - } - if (object.excludedTypes) { - if (!Array.isArray(object.excludedTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedTypes: array expected"); - message.excludedTypes = []; - for (var i = 0; i < object.excludedTypes.length; ++i) - message.excludedTypes[i] = String(object.excludedTypes[i]); - } - if (object.includedPrimaryTypes) { - if (!Array.isArray(object.includedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.includedPrimaryTypes: array expected"); - message.includedPrimaryTypes = []; - for (var i = 0; i < object.includedPrimaryTypes.length; ++i) - message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); - } - if (object.excludedPrimaryTypes) { - if (!Array.isArray(object.excludedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.excludedPrimaryTypes: array expected"); - message.excludedPrimaryTypes = []; - for (var i = 0; i < object.excludedPrimaryTypes.length; ++i) - message.excludedPrimaryTypes[i] = String(object.excludedPrimaryTypes[i]); - } - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.fromObject(object.locationRestriction); - } - switch (object.rankPreference) { - default: - if (typeof object.rankPreference === "number") { - message.rankPreference = object.rankPreference; - break; - } - break; - case "RANK_PREFERENCE_UNSPECIFIED": - case 0: - message.rankPreference = 0; - break; - case "DISTANCE": - case 1: - message.rankPreference = 1; - break; - case "POPULARITY": - case 2: - message.rankPreference = 2; + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a SearchNearbyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {google.maps.places.v1.SearchNearbyRequest} message SearchNearbyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchNearbyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includedTypes = []; - object.excludedTypes = []; - object.includedPrimaryTypes = []; - object.excludedPrimaryTypes = []; - } - if (options.defaults) { - object.languageCode = ""; - object.regionCode = ""; - object.maxResultCount = 0; - object.locationRestriction = null; - object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.includedTypes && message.includedTypes.length) { - object.includedTypes = []; - for (var j = 0; j < message.includedTypes.length; ++j) - object.includedTypes[j] = message.includedTypes[j]; - } - if (message.excludedTypes && message.excludedTypes.length) { - object.excludedTypes = []; - for (var j = 0; j < message.excludedTypes.length; ++j) - object.excludedTypes[j] = message.excludedTypes[j]; - } - if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { - object.includedPrimaryTypes = []; - for (var j = 0; j < message.includedPrimaryTypes.length; ++j) - object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; - } - if (message.excludedPrimaryTypes && message.excludedPrimaryTypes.length) { - object.excludedPrimaryTypes = []; - for (var j = 0; j < message.excludedPrimaryTypes.length; ++j) - object.excludedPrimaryTypes[j] = message.excludedPrimaryTypes[j]; - } - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] : message.rankPreference; - return object; - }; + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this SearchNearbyRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyRequest - * @instance - * @returns {Object.} JSON object - */ - SearchNearbyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Gets the default type url for SearchNearbyRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchNearbyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest"; - }; + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SearchNearbyRequest.LocationRestriction = (function() { + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.SearchNearbyRequest - * @interface ILocationRestriction - * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle - */ + return RubySettings; + })(); - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.SearchNearbyRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + api.GoSettings = (function() { - /** - * LocationRestriction circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.circle = null; + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LocationRestriction type. - * @member {"circle"|undefined} type - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["circle"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.circle != null && message.hasOwnProperty("circle")) { - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction(); - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyRequest.LocationRestriction.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchNearbyRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyRequest.LocationRestriction"; - }; + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; - return LocationRestriction; - })(); + return GoSettings; + })(); - /** - * RankPreference enum. - * @name google.maps.places.v1.SearchNearbyRequest.RankPreference - * @enum {number} - * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value - * @property {number} DISTANCE=1 DISTANCE value - * @property {number} POPULARITY=2 POPULARITY value - */ - SearchNearbyRequest.RankPreference = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISTANCE"] = 1; - values[valuesById[2] = "POPULARITY"] = 2; - return values; - })(); + api.MethodSettings = (function() { - return SearchNearbyRequest; - })(); + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ - v1.SearchNearbyResponse = (function() { + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a SearchNearbyResponse. - * @memberof google.maps.places.v1 - * @interface ISearchNearbyResponse - * @property {Array.|null} [places] SearchNearbyResponse places - */ + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; - /** - * Constructs a new SearchNearbyResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchNearbyResponse. - * @implements ISearchNearbyResponse - * @constructor - * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set - */ - function SearchNearbyResponse(properties) { - this.places = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; - /** - * SearchNearbyResponse places. - * @member {Array.} places - * @memberof google.maps.places.v1.SearchNearbyResponse - * @instance - */ - SearchNearbyResponse.prototype.places = $util.emptyArray; + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - /** - * Creates a new SearchNearbyResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse instance - */ - SearchNearbyResponse.create = function create(properties) { - return new SearchNearbyResponse(properties); - }; + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; - /** - * Encodes the specified SearchNearbyResponse message. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.places != null && message.places.length) - for (var i = 0; i < message.places.length; ++i) - $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; - /** - * Encodes the specified SearchNearbyResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchNearbyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.ISearchNearbyResponse} message SearchNearbyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchNearbyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchNearbyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.places && message.places.length)) - message.places = []; - message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; } - return message; - }; + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a SearchNearbyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchNearbyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a SearchNearbyResponse message. - * @function verify - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchNearbyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.places != null && message.hasOwnProperty("places")) { - if (!Array.isArray(message.places)) - return "places: array expected"; - for (var i = 0; i < message.places.length; ++i) { - var error = $root.google.maps.places.v1.Place.verify(message.places[i]); - if (error) - return "places." + error; - } - } - return null; - }; + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; - /** - * Creates a SearchNearbyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchNearbyResponse} SearchNearbyResponse - */ - SearchNearbyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchNearbyResponse) - return object; - var message = new $root.google.maps.places.v1.SearchNearbyResponse(); - if (object.places) { - if (!Array.isArray(object.places)) - throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: array expected"); - message.places = []; - for (var i = 0; i < object.places.length; ++i) { - if (typeof object.places[i] !== "object") - throw TypeError(".google.maps.places.v1.SearchNearbyResponse.places: object expected"); - message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); - } - } - return message; - }; + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; - /** - * Creates a plain object from a SearchNearbyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {google.maps.places.v1.SearchNearbyResponse} message SearchNearbyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchNearbyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.places = []; - if (message.places && message.places.length) { - object.places = []; - for (var j = 0; j < message.places.length; ++j) - object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); - } - return object; - }; + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; - /** - * Converts this SearchNearbyResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchNearbyResponse - * @instance - * @returns {Object.} JSON object - */ - SearchNearbyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for SearchNearbyResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchNearbyResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchNearbyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchNearbyResponse"; - }; + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; - return SearchNearbyResponse; - })(); + MethodSettings.LongRunning = (function() { - v1.SearchTextRequest = (function() { + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ - /** - * Properties of a SearchTextRequest. - * @memberof google.maps.places.v1 - * @interface ISearchTextRequest - * @property {string|null} [textQuery] SearchTextRequest textQuery - * @property {string|null} [languageCode] SearchTextRequest languageCode - * @property {string|null} [regionCode] SearchTextRequest regionCode - * @property {google.maps.places.v1.SearchTextRequest.RankPreference|null} [rankPreference] SearchTextRequest rankPreference - * @property {string|null} [includedType] SearchTextRequest includedType - * @property {boolean|null} [openNow] SearchTextRequest openNow - * @property {number|null} [minRating] SearchTextRequest minRating - * @property {number|null} [maxResultCount] SearchTextRequest maxResultCount - * @property {Array.|null} [priceLevels] SearchTextRequest priceLevels - * @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering - * @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias - * @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction - * @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions - */ + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new SearchTextRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchTextRequest. - * @implements ISearchTextRequest - * @constructor - * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set - */ - function SearchTextRequest(properties) { - this.priceLevels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; - /** - * SearchTextRequest textQuery. - * @member {string} textQuery - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.textQuery = ""; + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; - /** - * SearchTextRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.languageCode = ""; + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; - /** - * SearchTextRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.regionCode = ""; + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; - /** - * SearchTextRequest rankPreference. - * @member {google.maps.places.v1.SearchTextRequest.RankPreference} rankPreference - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.rankPreference = 0; + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; - /** - * SearchTextRequest includedType. - * @member {string} includedType - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.includedType = ""; + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * SearchTextRequest openNow. - * @member {boolean} openNow - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.openNow = false; + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SearchTextRequest minRating. - * @member {number} minRating - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.minRating = 0; + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * SearchTextRequest maxResultCount. - * @member {number} maxResultCount - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.maxResultCount = 0; + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * SearchTextRequest priceLevels. - * @member {Array.} priceLevels - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.priceLevels = $util.emptyArray; + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; - /** - * SearchTextRequest strictTypeFiltering. - * @member {boolean} strictTypeFiltering - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.strictTypeFiltering = false; + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; - /** - * SearchTextRequest locationBias. - * @member {google.maps.places.v1.SearchTextRequest.ILocationBias|null|undefined} locationBias - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.locationBias = null; + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; - /** - * SearchTextRequest locationRestriction. - * @member {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.locationRestriction = null; + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * SearchTextRequest evOptions. - * @member {google.maps.places.v1.SearchTextRequest.IEVOptions|null|undefined} evOptions - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - */ - SearchTextRequest.prototype.evOptions = null; + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; - /** - * Creates a new SearchTextRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest instance - */ - SearchTextRequest.create = function create(properties) { - return new SearchTextRequest(properties); - }; + return LongRunning; + })(); - /** - * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.textQuery != null && Object.hasOwnProperty.call(message, "textQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.textQuery); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); - if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rankPreference); - if (message.includedType != null && Object.hasOwnProperty.call(message, "includedType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.includedType); - if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.openNow); - if (message.minRating != null && Object.hasOwnProperty.call(message, "minRating")) - writer.uint32(/* id 9, wireType 1 =*/73).double(message.minRating); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxResultCount); - if (message.priceLevels != null && message.priceLevels.length) { - writer.uint32(/* id 11, wireType 2 =*/90).fork(); - for (var i = 0; i < message.priceLevels.length; ++i) - writer.int32(message.priceLevels[i]); - writer.ldelim(); - } - if (message.strictTypeFiltering != null && Object.hasOwnProperty.call(message, "strictTypeFiltering")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.strictTypeFiltering); - if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) - $root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions")) - $root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; + return MethodSettings; + })(); - /** - * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); - /** - * Decodes a SearchTextRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.textQuery = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.regionCode = reader.string(); - break; - } - case 4: { - message.rankPreference = reader.int32(); - break; - } - case 6: { - message.includedType = reader.string(); - break; - } - case 7: { - message.openNow = reader.bool(); - break; - } - case 9: { - message.minRating = reader.double(); - break; - } - case 10: { - message.maxResultCount = reader.int32(); - break; - } - case 11: { - if (!(message.priceLevels && message.priceLevels.length)) - message.priceLevels = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.priceLevels.push(reader.int32()); - } else - message.priceLevels.push(reader.int32()); - break; - } - case 12: { - message.strictTypeFiltering = reader.bool(); - break; - } - case 13: { - message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.decode(reader, reader.uint32()); - break; - } - case 14: { - message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 15: { - message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); - /** - * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return api; + })(); - /** - * Verifies a SearchTextRequest message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchTextRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.textQuery != null && message.hasOwnProperty("textQuery")) - if (!$util.isString(message.textQuery)) - return "textQuery: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - switch (message.rankPreference) { - default: - return "rankPreference: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.includedType != null && message.hasOwnProperty("includedType")) - if (!$util.isString(message.includedType)) - return "includedType: string expected"; - if (message.openNow != null && message.hasOwnProperty("openNow")) - if (typeof message.openNow !== "boolean") - return "openNow: boolean expected"; - if (message.minRating != null && message.hasOwnProperty("minRating")) - if (typeof message.minRating !== "number") - return "minRating: number expected"; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; - if (message.priceLevels != null && message.hasOwnProperty("priceLevels")) { - if (!Array.isArray(message.priceLevels)) - return "priceLevels: array expected"; - for (var i = 0; i < message.priceLevels.length; ++i) - switch (message.priceLevels[i]) { - default: - return "priceLevels: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - } - if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) - if (typeof message.strictTypeFiltering !== "boolean") - return "strictTypeFiltering: boolean expected"; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) { - var error = $root.google.maps.places.v1.SearchTextRequest.LocationBias.verify(message.locationBias); - if (error) - return "locationBias." + error; - } - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.evOptions != null && message.hasOwnProperty("evOptions")) { - var error = $root.google.maps.places.v1.SearchTextRequest.EVOptions.verify(message.evOptions); - if (error) - return "evOptions." + error; - } - return null; - }; + google.protobuf = (function() { - /** - * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest - */ - SearchTextRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest(); - if (object.textQuery != null) - message.textQuery = String(object.textQuery); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - switch (object.rankPreference) { - default: - if (typeof object.rankPreference === "number") { - message.rankPreference = object.rankPreference; - break; - } - break; - case "RANK_PREFERENCE_UNSPECIFIED": - case 0: - message.rankPreference = 0; - break; - case "DISTANCE": - case 1: - message.rankPreference = 1; - break; - case "RELEVANCE": - case 2: - message.rankPreference = 2; + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); break; } - if (object.includedType != null) - message.includedType = String(object.includedType); - if (object.openNow != null) - message.openNow = Boolean(object.openNow); - if (object.minRating != null) - message.minRating = Number(object.minRating); - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; - if (object.priceLevels) { - if (!Array.isArray(object.priceLevels)) - throw TypeError(".google.maps.places.v1.SearchTextRequest.priceLevels: array expected"); - message.priceLevels = []; - for (var i = 0; i < object.priceLevels.length; ++i) - switch (object.priceLevels[i]) { - default: - if (typeof object.priceLevels[i] === "number") { - message.priceLevels[i] = object.priceLevels[i]; - break; - } - case "PRICE_LEVEL_UNSPECIFIED": - case 0: - message.priceLevels[i] = 0; - break; - case "PRICE_LEVEL_FREE": - case 1: - message.priceLevels[i] = 1; - break; - case "PRICE_LEVEL_INEXPENSIVE": - case 2: - message.priceLevels[i] = 2; - break; - case "PRICE_LEVEL_MODERATE": - case 3: - message.priceLevels[i] = 3; - break; - case "PRICE_LEVEL_EXPENSIVE": - case 4: - message.priceLevels[i] = 4; - break; - case "PRICE_LEVEL_VERY_EXPENSIVE": - case 5: - message.priceLevels[i] = 5; - break; - } - } - if (object.strictTypeFiltering != null) - message.strictTypeFiltering = Boolean(object.strictTypeFiltering); - if (object.locationBias != null) { - if (typeof object.locationBias !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.locationBias: object expected"); - message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.fromObject(object.locationBias); - } - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction); - } - if (object.evOptions != null) { - if (typeof object.evOptions !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected"); - message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions); - } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {google.maps.places.v1.SearchTextRequest} message SearchTextRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchTextRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.priceLevels = []; - if (options.defaults) { - object.textQuery = ""; - object.languageCode = ""; - object.regionCode = ""; - object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; - object.includedType = ""; - object.openNow = false; - object.minRating = 0; - object.maxResultCount = 0; - object.strictTypeFiltering = false; - object.locationBias = null; - object.locationRestriction = null; - object.evOptions = null; - } - if (message.textQuery != null && message.hasOwnProperty("textQuery")) - object.textQuery = message.textQuery; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) - object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] : message.rankPreference; - if (message.includedType != null && message.hasOwnProperty("includedType")) - object.includedType = message.includedType; - if (message.openNow != null && message.hasOwnProperty("openNow")) - object.openNow = message.openNow; - if (message.minRating != null && message.hasOwnProperty("minRating")) - object.minRating = options.json && !isFinite(message.minRating) ? String(message.minRating) : message.minRating; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; - if (message.priceLevels && message.priceLevels.length) { - object.priceLevels = []; - for (var j = 0; j < message.priceLevels.length; ++j) - object.priceLevels[j] = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] === undefined ? message.priceLevels[j] : $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] : message.priceLevels[j]; - } - if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) - object.strictTypeFiltering = message.strictTypeFiltering; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) - object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options); - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.evOptions != null && message.hasOwnProperty("evOptions")) - object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options); - return object; - }; + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this SearchTextRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest - * @instance - * @returns {Object.} JSON object - */ - SearchTextRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; - /** - * Gets the default type url for SearchTextRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest"; - }; + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; - /** - * RankPreference enum. - * @name google.maps.places.v1.SearchTextRequest.RankPreference - * @enum {number} - * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value - * @property {number} DISTANCE=1 DISTANCE value - * @property {number} RELEVANCE=2 RELEVANCE value - */ - SearchTextRequest.RankPreference = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISTANCE"] = 1; - values[valuesById[2] = "RELEVANCE"] = 2; - return values; - })(); + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SearchTextRequest.LocationBias = (function() { + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; - /** - * Properties of a LocationBias. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface ILocationBias - * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle - */ + return FileDescriptorSet; + })(); - /** - * Constructs a new LocationBias. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a LocationBias. - * @implements ILocationBias - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set - */ - function LocationBias(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); - /** - * LocationBias rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - LocationBias.prototype.rectangle = null; + protobuf.FileDescriptorProto = (function() { - /** - * LocationBias circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - LocationBias.prototype.circle = null; + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LocationBias type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - */ - Object.defineProperty(LocationBias.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - /** - * Creates a new LocationBias instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias instance - */ - LocationBias.create = function create(properties) { - return new LocationBias(properties); - }; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - /** - * Verifies a LocationBias message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationBias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias - */ - LocationBias.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationBias) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {google.maps.places.v1.SearchTextRequest.LocationBias} message LocationBias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationBias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * Converts this LocationBias to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @instance - * @returns {Object.} JSON object - */ - LocationBias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * Gets the default type url for LocationBias - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.LocationBias - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationBias"; - }; + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - return LocationBias; - })(); + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - SearchTextRequest.LocationRestriction = (function() { + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface ILocationRestriction - * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle - */ + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * LocationRestriction rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.rectangle = null; + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; - /** - * LocationRestriction type. - * @member {"rectangle"|undefined} type - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return FileDescriptorProto; + })(); - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + protobuf.DescriptorProto = (function() { - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - return null; - }; + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationRestriction.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - return message; - }; + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - return object; - }; + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationRestriction"; - }; + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - return LocationRestriction; - })(); + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - SearchTextRequest.EVOptions = (function() { + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Properties of a EVOptions. - * @memberof google.maps.places.v1.SearchTextRequest - * @interface IEVOptions - * @property {number|null} [minimumChargingRateKw] EVOptions minimumChargingRateKw - * @property {Array.|null} [connectorTypes] EVOptions connectorTypes - */ + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; - /** - * Constructs a new EVOptions. - * @memberof google.maps.places.v1.SearchTextRequest - * @classdesc Represents a EVOptions. - * @implements IEVOptions - * @constructor - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set - */ - function EVOptions(properties) { - this.connectorTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * EVOptions minimumChargingRateKw. - * @member {number} minimumChargingRateKw - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - */ - EVOptions.prototype.minimumChargingRateKw = 0; + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * EVOptions connectorTypes. - * @member {Array.} connectorTypes - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - */ - EVOptions.prototype.connectorTypes = $util.emptyArray; + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Creates a new EVOptions instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions instance - */ - EVOptions.create = function create(properties) { - return new EVOptions(properties); - }; + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; - /** - * Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.minimumChargingRateKw != null && Object.hasOwnProperty.call(message, "minimumChargingRateKw")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimumChargingRateKw); - if (message.connectorTypes != null && message.connectorTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.connectorTypes.length; ++i) - writer.int32(message.connectorTypes[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; - /** - * Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EVOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a EVOptions message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.minimumChargingRateKw = reader.double(); - break; - } - case 2: { - if (!(message.connectorTypes && message.connectorTypes.length)) - message.connectorTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.connectorTypes.push(reader.int32()); - } else - message.connectorTypes.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a EVOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EVOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a EVOptions message. - * @function verify - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EVOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) - if (typeof message.minimumChargingRateKw !== "number") - return "minimumChargingRateKw: number expected"; - if (message.connectorTypes != null && message.hasOwnProperty("connectorTypes")) { - if (!Array.isArray(message.connectorTypes)) - return "connectorTypes: array expected"; - for (var i = 0; i < message.connectorTypes.length; ++i) - switch (message.connectorTypes[i]) { - default: - return "connectorTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - return null; - }; + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * Creates a EVOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions - */ - EVOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextRequest.EVOptions) - return object; - var message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions(); - if (object.minimumChargingRateKw != null) - message.minimumChargingRateKw = Number(object.minimumChargingRateKw); - if (object.connectorTypes) { - if (!Array.isArray(object.connectorTypes)) - throw TypeError(".google.maps.places.v1.SearchTextRequest.EVOptions.connectorTypes: array expected"); - message.connectorTypes = []; - for (var i = 0; i < object.connectorTypes.length; ++i) - switch (object.connectorTypes[i]) { - default: - if (typeof object.connectorTypes[i] === "number") { - message.connectorTypes[i] = object.connectorTypes[i]; - break; - } - case "EV_CONNECTOR_TYPE_UNSPECIFIED": - case 0: - message.connectorTypes[i] = 0; - break; - case "EV_CONNECTOR_TYPE_OTHER": - case 1: - message.connectorTypes[i] = 1; - break; - case "EV_CONNECTOR_TYPE_J1772": - case 2: - message.connectorTypes[i] = 2; - break; - case "EV_CONNECTOR_TYPE_TYPE_2": - case 3: - message.connectorTypes[i] = 3; - break; - case "EV_CONNECTOR_TYPE_CHADEMO": - case 4: - message.connectorTypes[i] = 4; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_1": - case 5: - message.connectorTypes[i] = 5; - break; - case "EV_CONNECTOR_TYPE_CCS_COMBO_2": - case 6: - message.connectorTypes[i] = 6; - break; - case "EV_CONNECTOR_TYPE_TESLA": - case 7: - message.connectorTypes[i] = 7; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T": - case 8: - message.connectorTypes[i] = 8; - break; - case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET": - case 9: - message.connectorTypes[i] = 9; - break; - } - } - return message; - }; + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * Creates a plain object from a EVOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {google.maps.places.v1.SearchTextRequest.EVOptions} message EVOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EVOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connectorTypes = []; - if (options.defaults) - object.minimumChargingRateKw = 0; - if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw")) - object.minimumChargingRateKw = options.json && !isFinite(message.minimumChargingRateKw) ? String(message.minimumChargingRateKw) : message.minimumChargingRateKw; - if (message.connectorTypes && message.connectorTypes.length) { - object.connectorTypes = []; - for (var j = 0; j < message.connectorTypes.length; ++j) - object.connectorTypes[j] = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] === undefined ? message.connectorTypes[j] : $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] : message.connectorTypes[j]; - } - return object; - }; + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - /** - * Converts this EVOptions to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @instance - * @returns {Object.} JSON object - */ - EVOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for EVOptions - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextRequest.EVOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.EVOptions"; - }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; - return EVOptions; - })(); + DescriptorProto.ExtensionRange = (function() { - return SearchTextRequest; - })(); + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ - v1.SearchTextResponse = (function() { + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a SearchTextResponse. - * @memberof google.maps.places.v1 - * @interface ISearchTextResponse - * @property {Array.|null} [places] SearchTextResponse places - */ + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * Constructs a new SearchTextResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents a SearchTextResponse. - * @implements ISearchTextResponse - * @constructor - * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set - */ - function SearchTextResponse(properties) { - this.places = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * SearchTextResponse places. - * @member {Array.} places - * @memberof google.maps.places.v1.SearchTextResponse - * @instance - */ - SearchTextResponse.prototype.places = $util.emptyArray; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * Creates a new SearchTextResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse instance - */ - SearchTextResponse.create = function create(properties) { - return new SearchTextResponse(properties); - }; + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; - /** - * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.places != null && message.places.length) - for (var i = 0; i < message.places.length; ++i) - $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTextResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SearchTextResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.places && message.places.length)) - message.places = []; - message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); break; } - } - return message; - }; - - /** - * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTextResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchTextResponse message. - * @function verify - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchTextResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.places != null && message.hasOwnProperty("places")) { - if (!Array.isArray(message.places)) - return "places: array expected"; - for (var i = 0; i < message.places.length; ++i) { - var error = $root.google.maps.places.v1.Place.verify(message.places[i]); - if (error) - return "places." + error; + case 2: { + message.end = reader.int32(); + break; } - } - return null; - }; - - /** - * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse - */ - SearchTextResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.SearchTextResponse) - return object; - var message = new $root.google.maps.places.v1.SearchTextResponse(); - if (object.places) { - if (!Array.isArray(object.places)) - throw TypeError(".google.maps.places.v1.SearchTextResponse.places: array expected"); - message.places = []; - for (var i = 0; i < object.places.length; ++i) { - if (typeof object.places[i] !== "object") - throw TypeError(".google.maps.places.v1.SearchTextResponse.places: object expected"); - message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {google.maps.places.v1.SearchTextResponse} message SearchTextResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchTextResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.places = []; - if (message.places && message.places.length) { - object.places = []; - for (var j = 0; j < message.places.length; ++j) - object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); - } - return object; - }; + } + return message; + }; - /** - * Converts this SearchTextResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.SearchTextResponse - * @instance - * @returns {Object.} JSON object - */ - SearchTextResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for SearchTextResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.SearchTextResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.SearchTextResponse"; - }; + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - return SearchTextResponse; - })(); + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; - v1.GetPhotoMediaRequest = (function() { + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; - /** - * Properties of a GetPhotoMediaRequest. - * @memberof google.maps.places.v1 - * @interface IGetPhotoMediaRequest - * @property {string|null} [name] GetPhotoMediaRequest name - * @property {number|null} [maxWidthPx] GetPhotoMediaRequest maxWidthPx - * @property {number|null} [maxHeightPx] GetPhotoMediaRequest maxHeightPx - * @property {boolean|null} [skipHttpRedirect] GetPhotoMediaRequest skipHttpRedirect - */ + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new GetPhotoMediaRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a GetPhotoMediaRequest. - * @implements IGetPhotoMediaRequest - * @constructor - * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set - */ - function GetPhotoMediaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; - /** - * GetPhotoMediaRequest name. - * @member {string} name - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.name = ""; + return ExtensionRange; + })(); - /** - * GetPhotoMediaRequest maxWidthPx. - * @member {number} maxWidthPx - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.maxWidthPx = 0; + DescriptorProto.ReservedRange = (function() { - /** - * GetPhotoMediaRequest maxHeightPx. - * @member {number} maxHeightPx - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.maxHeightPx = 0; + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * GetPhotoMediaRequest skipHttpRedirect. - * @member {boolean} skipHttpRedirect - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - */ - GetPhotoMediaRequest.prototype.skipHttpRedirect = false; + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new GetPhotoMediaRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest instance - */ - GetPhotoMediaRequest.create = function create(properties) { - return new GetPhotoMediaRequest(properties); - }; + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - /** - * Encodes the specified GetPhotoMediaRequest message. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPhotoMediaRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.maxWidthPx != null && Object.hasOwnProperty.call(message, "maxWidthPx")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxWidthPx); - if (message.maxHeightPx != null && Object.hasOwnProperty.call(message, "maxHeightPx")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxHeightPx); - if (message.skipHttpRedirect != null && Object.hasOwnProperty.call(message, "skipHttpRedirect")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipHttpRedirect); - return writer; - }; + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; - /** - * Encodes the specified GetPhotoMediaRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPhotoMediaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.IGetPhotoMediaRequest} message GetPhotoMediaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPhotoMediaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPhotoMediaRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.maxWidthPx = reader.int32(); - break; - } - case 3: { - message.maxHeightPx = reader.int32(); - break; - } - case 4: { - message.skipHttpRedirect = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); break; } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a GetPhotoMediaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPhotoMediaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a GetPhotoMediaRequest message. - * @function verify - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPhotoMediaRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) - if (!$util.isInteger(message.maxWidthPx)) - return "maxWidthPx: integer expected"; - if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) - if (!$util.isInteger(message.maxHeightPx)) - return "maxHeightPx: integer expected"; - if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) - if (typeof message.skipHttpRedirect !== "boolean") - return "skipHttpRedirect: boolean expected"; - return null; - }; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetPhotoMediaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.GetPhotoMediaRequest} GetPhotoMediaRequest - */ - GetPhotoMediaRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.GetPhotoMediaRequest) - return object; - var message = new $root.google.maps.places.v1.GetPhotoMediaRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.maxWidthPx != null) - message.maxWidthPx = object.maxWidthPx | 0; - if (object.maxHeightPx != null) - message.maxHeightPx = object.maxHeightPx | 0; - if (object.skipHttpRedirect != null) - message.skipHttpRedirect = Boolean(object.skipHttpRedirect); - return message; - }; + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; - /** - * Creates a plain object from a GetPhotoMediaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {google.maps.places.v1.GetPhotoMediaRequest} message GetPhotoMediaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPhotoMediaRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.maxWidthPx = 0; - object.maxHeightPx = 0; - object.skipHttpRedirect = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.maxWidthPx != null && message.hasOwnProperty("maxWidthPx")) - object.maxWidthPx = message.maxWidthPx; - if (message.maxHeightPx != null && message.hasOwnProperty("maxHeightPx")) - object.maxHeightPx = message.maxHeightPx; - if (message.skipHttpRedirect != null && message.hasOwnProperty("skipHttpRedirect")) - object.skipHttpRedirect = message.skipHttpRedirect; + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; - }; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * Converts this GetPhotoMediaRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @instance - * @returns {Object.} JSON object - */ - GetPhotoMediaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * Gets the default type url for GetPhotoMediaRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.GetPhotoMediaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPhotoMediaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.GetPhotoMediaRequest"; - }; + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetPhotoMediaRequest; - })(); + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; - v1.PhotoMedia = (function() { + return ReservedRange; + })(); - /** - * Properties of a PhotoMedia. - * @memberof google.maps.places.v1 - * @interface IPhotoMedia - * @property {string|null} [name] PhotoMedia name - * @property {string|null} [photoUri] PhotoMedia photoUri - */ + return DescriptorProto; + })(); - /** - * Constructs a new PhotoMedia. - * @memberof google.maps.places.v1 - * @classdesc Represents a PhotoMedia. - * @implements IPhotoMedia - * @constructor - * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set - */ - function PhotoMedia(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.ExtensionRangeOptions = (function() { - /** - * PhotoMedia name. - * @member {string} name - * @memberof google.maps.places.v1.PhotoMedia - * @instance - */ - PhotoMedia.prototype.name = ""; + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ - /** - * PhotoMedia photoUri. - * @member {string} photoUri - * @memberof google.maps.places.v1.PhotoMedia - * @instance - */ - PhotoMedia.prototype.photoUri = ""; + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new PhotoMedia instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia=} [properties] Properties to set - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia instance - */ - PhotoMedia.create = function create(properties) { - return new PhotoMedia(properties); - }; + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified PhotoMedia message. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoMedia.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.photoUri != null && Object.hasOwnProperty.call(message, "photoUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.photoUri); - return writer; - }; + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified PhotoMedia message, length delimited. Does not implicitly {@link google.maps.places.v1.PhotoMedia.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.IPhotoMedia} message PhotoMedia message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhotoMedia.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PhotoMedia message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoMedia.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.PhotoMedia(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.photoUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; } - return message; - }; - - /** - * Decodes a PhotoMedia message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhotoMedia.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a PhotoMedia message. - * @function verify - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhotoMedia.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - if (!$util.isString(message.photoUri)) - return "photoUri: string expected"; - return null; - }; + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a PhotoMedia message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.PhotoMedia} PhotoMedia - */ - PhotoMedia.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.PhotoMedia) - return object; - var message = new $root.google.maps.places.v1.PhotoMedia(); - if (object.name != null) - message.name = String(object.name); - if (object.photoUri != null) - message.photoUri = String(object.photoUri); - return message; - }; + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; - /** - * Creates a plain object from a PhotoMedia message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {google.maps.places.v1.PhotoMedia} message PhotoMedia - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhotoMedia.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.photoUri = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.photoUri != null && message.hasOwnProperty("photoUri")) - object.photoUri = message.photoUri; - return object; - }; + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; - /** - * Converts this PhotoMedia to JSON. - * @function toJSON - * @memberof google.maps.places.v1.PhotoMedia - * @instance - * @returns {Object.} JSON object - */ - PhotoMedia.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Gets the default type url for PhotoMedia - * @function getTypeUrl - * @memberof google.maps.places.v1.PhotoMedia - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhotoMedia.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.PhotoMedia"; - }; + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PhotoMedia; - })(); + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; - v1.GetPlaceRequest = (function() { + ExtensionRangeOptions.Declaration = (function() { - /** - * Properties of a GetPlaceRequest. - * @memberof google.maps.places.v1 - * @interface IGetPlaceRequest - * @property {string|null} [name] GetPlaceRequest name - * @property {string|null} [languageCode] GetPlaceRequest languageCode - * @property {string|null} [regionCode] GetPlaceRequest regionCode - * @property {string|null} [sessionToken] GetPlaceRequest sessionToken - */ + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ - /** - * Constructs a new GetPlaceRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents a GetPlaceRequest. - * @implements IGetPlaceRequest - * @constructor - * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set - */ - function GetPlaceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * GetPlaceRequest name. - * @member {string} name - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.name = ""; + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; - /** - * GetPlaceRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.languageCode = ""; + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; - /** - * GetPlaceRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.regionCode = ""; + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; - /** - * GetPlaceRequest sessionToken. - * @member {string} sessionToken - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - */ - GetPlaceRequest.prototype.sessionToken = ""; + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; - /** - * Creates a new GetPlaceRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest instance - */ - GetPlaceRequest.create = function create(properties) { - return new GetPlaceRequest(properties); - }; + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; - /** - * Encodes the specified GetPlaceRequest message. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPlaceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); - if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionToken); - return writer; - }; + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; - /** - * Encodes the specified GetPlaceRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.GetPlaceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.IGetPlaceRequest} message GetPlaceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPlaceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPlaceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.GetPlaceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.languageCode = reader.string(); - break; - } - case 3: { - message.regionCode = reader.string(); - break; - } - case 4: { - message.sessionToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a GetPlaceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPlaceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a GetPlaceRequest message. - * @function verify - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPlaceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - if (!$util.isString(message.sessionToken)) - return "sessionToken: string expected"; - return null; - }; + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a GetPlaceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.GetPlaceRequest} GetPlaceRequest - */ - GetPlaceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.GetPlaceRequest) - return object; - var message = new $root.google.maps.places.v1.GetPlaceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.sessionToken != null) - message.sessionToken = String(object.sessionToken); - return message; - }; + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; - /** - * Creates a plain object from a GetPlaceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {google.maps.places.v1.GetPlaceRequest} message GetPlaceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPlaceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.languageCode = ""; - object.regionCode = ""; - object.sessionToken = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - object.sessionToken = message.sessionToken; + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) return object; - }; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; - /** - * Converts this GetPlaceRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.GetPlaceRequest - * @instance - * @returns {Object.} JSON object - */ - GetPlaceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; - /** - * Gets the default type url for GetPlaceRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.GetPlaceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPlaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.GetPlaceRequest"; - }; + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetPlaceRequest; - })(); + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; - v1.AutocompletePlacesRequest = (function() { + return Declaration; + })(); - /** - * Properties of an AutocompletePlacesRequest. - * @memberof google.maps.places.v1 - * @interface IAutocompletePlacesRequest - * @property {string|null} [input] AutocompletePlacesRequest input - * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null} [locationBias] AutocompletePlacesRequest locationBias - * @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null} [locationRestriction] AutocompletePlacesRequest locationRestriction - * @property {Array.|null} [includedPrimaryTypes] AutocompletePlacesRequest includedPrimaryTypes - * @property {Array.|null} [includedRegionCodes] AutocompletePlacesRequest includedRegionCodes - * @property {string|null} [languageCode] AutocompletePlacesRequest languageCode - * @property {string|null} [regionCode] AutocompletePlacesRequest regionCode - * @property {google.type.ILatLng|null} [origin] AutocompletePlacesRequest origin - * @property {number|null} [inputOffset] AutocompletePlacesRequest inputOffset - * @property {boolean|null} [includeQueryPredictions] AutocompletePlacesRequest includeQueryPredictions - * @property {string|null} [sessionToken] AutocompletePlacesRequest sessionToken - */ + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); - /** - * Constructs a new AutocompletePlacesRequest. - * @memberof google.maps.places.v1 - * @classdesc Represents an AutocompletePlacesRequest. - * @implements IAutocompletePlacesRequest - * @constructor - * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set - */ - function AutocompletePlacesRequest(properties) { - this.includedPrimaryTypes = []; - this.includedRegionCodes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return ExtensionRangeOptions; + })(); - /** - * AutocompletePlacesRequest input. - * @member {string} input - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.input = ""; + protobuf.FieldDescriptorProto = (function() { - /** - * AutocompletePlacesRequest locationBias. - * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null|undefined} locationBias - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.locationBias = null; + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ - /** - * AutocompletePlacesRequest locationRestriction. - * @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null|undefined} locationRestriction - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.locationRestriction = null; + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - /** - * AutocompletePlacesRequest includedPrimaryTypes. - * @member {Array.} includedPrimaryTypes - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includedPrimaryTypes = $util.emptyArray; + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - /** - * AutocompletePlacesRequest includedRegionCodes. - * @member {Array.} includedRegionCodes - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includedRegionCodes = $util.emptyArray; + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * AutocompletePlacesRequest languageCode. - * @member {string} languageCode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.languageCode = ""; + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - /** - * AutocompletePlacesRequest regionCode. - * @member {string} regionCode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.regionCode = ""; + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - /** - * AutocompletePlacesRequest origin. - * @member {google.type.ILatLng|null|undefined} origin - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.origin = null; + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * AutocompletePlacesRequest inputOffset. - * @member {number} inputOffset - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.inputOffset = 0; + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - /** - * AutocompletePlacesRequest includeQueryPredictions. - * @member {boolean} includeQueryPredictions - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.includeQueryPredictions = false; + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - /** - * AutocompletePlacesRequest sessionToken. - * @member {string} sessionToken - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - */ - AutocompletePlacesRequest.prototype.sessionToken = ""; + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * Creates a new AutocompletePlacesRequest instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest instance - */ - AutocompletePlacesRequest.create = function create(properties) { - return new AutocompletePlacesRequest(properties); - }; + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; - /** - * Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.input != null && Object.hasOwnProperty.call(message, "input")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.input); - if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) - $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) - $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length) - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.includedPrimaryTypes[i]); - if (message.includedRegionCodes != null && message.includedRegionCodes.length) - for (var i = 0; i < message.includedRegionCodes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedRegionCodes[i]); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode); - if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.regionCode); - if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) - $root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.inputOffset != null && Object.hasOwnProperty.call(message, "inputOffset")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.inputOffset); - if (message.includeQueryPredictions != null && Object.hasOwnProperty.call(message, "includeQueryPredictions")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.includeQueryPredictions); - if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.sessionToken); - return writer; - }; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; - /** - * Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.input = reader.string(); - break; - } - case 2: { - message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.decode(reader, reader.uint32()); - break; - } - case 3: { - message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length)) - message.includedPrimaryTypes = []; - message.includedPrimaryTypes.push(reader.string()); - break; - } - case 5: { - if (!(message.includedRegionCodes && message.includedRegionCodes.length)) - message.includedRegionCodes = []; - message.includedRegionCodes.push(reader.string()); - break; - } - case 6: { - message.languageCode = reader.string(); - break; - } - case 7: { - message.regionCode = reader.string(); - break; - } - case 8: { - message.origin = $root.google.type.LatLng.decode(reader, reader.uint32()); - break; - } - case 9: { - message.inputOffset = reader.int32(); - break; - } - case 10: { - message.includeQueryPredictions = reader.bool(); - break; - } - case 11: { - message.sessionToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; - /** - * Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an AutocompletePlacesRequest message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutocompletePlacesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.input != null && message.hasOwnProperty("input")) - if (!$util.isString(message.input)) - return "input: string expected"; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) { - var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify(message.locationBias); - if (error) - return "locationBias." + error; - } - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { - var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify(message.locationRestriction); - if (error) - return "locationRestriction." + error; - } - if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) { - if (!Array.isArray(message.includedPrimaryTypes)) - return "includedPrimaryTypes: array expected"; - for (var i = 0; i < message.includedPrimaryTypes.length; ++i) - if (!$util.isString(message.includedPrimaryTypes[i])) - return "includedPrimaryTypes: string[] expected"; - } - if (message.includedRegionCodes != null && message.hasOwnProperty("includedRegionCodes")) { - if (!Array.isArray(message.includedRegionCodes)) - return "includedRegionCodes: array expected"; - for (var i = 0; i < message.includedRegionCodes.length; ++i) - if (!$util.isString(message.includedRegionCodes[i])) - return "includedRegionCodes: string[] expected"; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - if (!$util.isString(message.regionCode)) - return "regionCode: string expected"; - if (message.origin != null && message.hasOwnProperty("origin")) { - var error = $root.google.type.LatLng.verify(message.origin); - if (error) - return "origin." + error; + case 3: { + message.number = reader.int32(); + break; } - if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) - if (!$util.isInteger(message.inputOffset)) - return "inputOffset: integer expected"; - if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) - if (typeof message.includeQueryPredictions !== "boolean") - return "includeQueryPredictions: boolean expected"; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - if (!$util.isString(message.sessionToken)) - return "sessionToken: string expected"; - return null; - }; - - /** - * Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest - */ - AutocompletePlacesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest(); - if (object.input != null) - message.input = String(object.input); - if (object.locationBias != null) { - if (typeof object.locationBias !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationBias: object expected"); - message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.fromObject(object.locationBias); + case 4: { + message.label = reader.int32(); + break; } - if (object.locationRestriction != null) { - if (typeof object.locationRestriction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationRestriction: object expected"); - message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.fromObject(object.locationRestriction); + case 5: { + message.type = reader.int32(); + break; } - if (object.includedPrimaryTypes) { - if (!Array.isArray(object.includedPrimaryTypes)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedPrimaryTypes: array expected"); - message.includedPrimaryTypes = []; - for (var i = 0; i < object.includedPrimaryTypes.length; ++i) - message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]); + case 6: { + message.typeName = reader.string(); + break; } - if (object.includedRegionCodes) { - if (!Array.isArray(object.includedRegionCodes)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedRegionCodes: array expected"); - message.includedRegionCodes = []; - for (var i = 0; i < object.includedRegionCodes.length; ++i) - message.includedRegionCodes[i] = String(object.includedRegionCodes[i]); + case 2: { + message.extendee = reader.string(); + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.regionCode != null) - message.regionCode = String(object.regionCode); - if (object.origin != null) { - if (typeof object.origin !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.origin: object expected"); - message.origin = $root.google.type.LatLng.fromObject(object.origin); + case 7: { + message.defaultValue = reader.string(); + break; } - if (object.inputOffset != null) - message.inputOffset = object.inputOffset | 0; - if (object.includeQueryPredictions != null) - message.includeQueryPredictions = Boolean(object.includeQueryPredictions); - if (object.sessionToken != null) - message.sessionToken = String(object.sessionToken); - return message; - }; - - /** - * Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest} message AutocompletePlacesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutocompletePlacesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.includedPrimaryTypes = []; - object.includedRegionCodes = []; + case 9: { + message.oneofIndex = reader.int32(); + break; } - if (options.defaults) { - object.input = ""; - object.locationBias = null; - object.locationRestriction = null; - object.languageCode = ""; - object.regionCode = ""; - object.origin = null; - object.inputOffset = 0; - object.includeQueryPredictions = false; - object.sessionToken = ""; + case 10: { + message.jsonName = reader.string(); + break; } - if (message.input != null && message.hasOwnProperty("input")) - object.input = message.input; - if (message.locationBias != null && message.hasOwnProperty("locationBias")) - object.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.toObject(message.locationBias, options); - if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) - object.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.toObject(message.locationRestriction, options); - if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) { - object.includedPrimaryTypes = []; - for (var j = 0; j < message.includedPrimaryTypes.length; ++j) - object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j]; + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; } - if (message.includedRegionCodes && message.includedRegionCodes.length) { - object.includedRegionCodes = []; - for (var j = 0; j < message.includedRegionCodes.length; ++j) - object.includedRegionCodes[j] = message.includedRegionCodes[j]; + case 17: { + message.proto3Optional = reader.bool(); + break; } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.regionCode != null && message.hasOwnProperty("regionCode")) - object.regionCode = message.regionCode; - if (message.origin != null && message.hasOwnProperty("origin")) - object.origin = $root.google.type.LatLng.toObject(message.origin, options); - if (message.inputOffset != null && message.hasOwnProperty("inputOffset")) - object.inputOffset = message.inputOffset; - if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions")) - object.includeQueryPredictions = message.includeQueryPredictions; - if (message.sessionToken != null && message.hasOwnProperty("sessionToken")) - object.sessionToken = message.sessionToken; - return object; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this AutocompletePlacesRequest to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @instance - * @returns {Object.} JSON object - */ - AutocompletePlacesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for AutocompletePlacesRequest - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutocompletePlacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest"; - }; + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; - AutocompletePlacesRequest.LocationBias = (function() { + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; - /** - * Properties of a LocationBias. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @interface ILocationBias - * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle - */ + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; - /** - * Constructs a new LocationBias. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @classdesc Represents a LocationBias. - * @implements ILocationBias - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set - */ - function LocationBias(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * LocationBias rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - LocationBias.prototype.rectangle = null; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; - /** - * LocationBias circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - LocationBias.prototype.circle = null; + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); - /** - * LocationBias type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - */ - Object.defineProperty(LocationBias.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); + return FieldDescriptorProto; + })(); - /** - * Creates a new LocationBias instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias instance - */ - LocationBias.create = function create(properties) { - return new LocationBias(properties); - }; + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationBias.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * Decodes a LocationBias message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; - /** - * Decodes a LocationBias message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationBias.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Verifies a LocationBias message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationBias.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias - */ - LocationBias.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a LocationBias message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} message LocationBias - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationBias.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this LocationBias to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @instance - * @returns {Object.} JSON object - */ - LocationBias.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Gets the default type url for LocationBias - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationBias"; - }; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; - return LocationBias; - })(); + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; - AutocompletePlacesRequest.LocationRestriction = (function() { + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a LocationRestriction. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @interface ILocationRestriction - * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle - * @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle - */ + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; - /** - * Constructs a new LocationRestriction. - * @memberof google.maps.places.v1.AutocompletePlacesRequest - * @classdesc Represents a LocationRestriction. - * @implements ILocationRestriction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set - */ - function LocationRestriction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return OneofDescriptorProto; + })(); - /** - * LocationRestriction rectangle. - * @member {google.geo.type.IViewport|null|undefined} rectangle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.rectangle = null; + protobuf.EnumDescriptorProto = (function() { - /** - * LocationRestriction circle. - * @member {google.maps.places.v1.ICircle|null|undefined} circle - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - LocationRestriction.prototype.circle = null; + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LocationRestriction type. - * @member {"rectangle"|"circle"|undefined} type - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - */ - Object.defineProperty(LocationRestriction.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * Creates a new LocationRestriction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction instance - */ - LocationRestriction.create = function create(properties) { - return new LocationRestriction(properties); - }; + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - /** - * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) - $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) - $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Decodes a LocationRestriction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); - break; - } - case 2: { - message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; - /** - * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocationRestriction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; - /** - * Verifies a LocationRestriction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocationRestriction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - properties.type = 1; - { - var error = $root.google.geo.type.Viewport.verify(message.rectangle); - if (error) - return "rectangle." + error; - } - } - if (message.circle != null && message.hasOwnProperty("circle")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.maps.places.v1.Circle.verify(message.circle); - if (error) - return "circle." + error; - } - } - return null; - }; + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction - */ - LocationRestriction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction(); - if (object.rectangle != null) { - if (typeof object.rectangle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.rectangle: object expected"); - message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); - } - if (object.circle != null) { - if (typeof object.circle !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.circle: object expected"); - message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); - } - return message; - }; + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} message LocationRestriction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationRestriction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rectangle != null && message.hasOwnProperty("rectangle")) { - object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); - if (options.oneofs) - object.type = "rectangle"; - } - if (message.circle != null && message.hasOwnProperty("circle")) { - object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); - if (options.oneofs) - object.type = "circle"; - } - return object; - }; + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this LocationRestriction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @instance - * @returns {Object.} JSON object - */ - LocationRestriction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; - /** - * Gets the default type url for LocationRestriction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction"; - }; + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - return LocationRestriction; - })(); + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - return AutocompletePlacesRequest; - })(); + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.AutocompletePlacesResponse = (function() { + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; - /** - * Properties of an AutocompletePlacesResponse. - * @memberof google.maps.places.v1 - * @interface IAutocompletePlacesResponse - * @property {Array.|null} [suggestions] AutocompletePlacesResponse suggestions - */ + EnumDescriptorProto.EnumReservedRange = (function() { - /** - * Constructs a new AutocompletePlacesResponse. - * @memberof google.maps.places.v1 - * @classdesc Represents an AutocompletePlacesResponse. - * @implements IAutocompletePlacesResponse - * @constructor - * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set - */ - function AutocompletePlacesResponse(properties) { - this.suggestions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ - /** - * AutocompletePlacesResponse suggestions. - * @member {Array.} suggestions - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @instance - */ - AutocompletePlacesResponse.prototype.suggestions = $util.emptyArray; + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; - /** - * Creates a new AutocompletePlacesResponse instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse instance - */ - AutocompletePlacesResponse.create = function create(properties) { - return new AutocompletePlacesResponse(properties); - }; + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; - /** - * Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.suggestions != null && message.suggestions.length) - for (var i = 0; i < message.suggestions.length; ++i) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; - /** - * Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AutocompletePlacesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.suggestions && message.suggestions.length)) - message.suggestions = []; - message.suggestions.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); break; } - } - return message; - }; - - /** - * Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AutocompletePlacesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AutocompletePlacesResponse message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AutocompletePlacesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestions != null && message.hasOwnProperty("suggestions")) { - if (!Array.isArray(message.suggestions)) - return "suggestions: array expected"; - for (var i = 0; i < message.suggestions.length; ++i) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify(message.suggestions[i]); - if (error) - return "suggestions." + error; + case 2: { + message.end = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse - */ - AutocompletePlacesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse(); - if (object.suggestions) { - if (!Array.isArray(object.suggestions)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: array expected"); - message.suggestions = []; - for (var i = 0; i < object.suggestions.length; ++i) { - if (typeof object.suggestions[i] !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: object expected"); - message.suggestions[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.fromObject(object.suggestions[i]); - } - } - return message; - }; + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse} message AutocompletePlacesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AutocompletePlacesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.suggestions = []; - if (message.suggestions && message.suggestions.length) { - object.suggestions = []; - for (var j = 0; j < message.suggestions.length; ++j) - object.suggestions[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.toObject(message.suggestions[j], options); - } + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; - }; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * Converts this AutocompletePlacesResponse to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @instance - * @returns {Object.} JSON object - */ - AutocompletePlacesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * Gets the default type url for AutocompletePlacesResponse - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AutocompletePlacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse"; - }; + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - AutocompletePlacesResponse.Suggestion = (function() { + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; - /** - * Properties of a Suggestion. - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @interface ISuggestion - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null} [placePrediction] Suggestion placePrediction - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null} [queryPrediction] Suggestion queryPrediction - */ + return EnumReservedRange; + })(); - /** - * Constructs a new Suggestion. - * @memberof google.maps.places.v1.AutocompletePlacesResponse - * @classdesc Represents a Suggestion. - * @implements ISuggestion - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set - */ - function Suggestion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return EnumDescriptorProto; + })(); - /** - * Suggestion placePrediction. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null|undefined} placePrediction - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Suggestion.prototype.placePrediction = null; + protobuf.EnumValueDescriptorProto = (function() { - /** - * Suggestion queryPrediction. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null|undefined} queryPrediction - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Suggestion.prototype.queryPrediction = null; + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Suggestion kind. - * @member {"placePrediction"|"queryPrediction"|undefined} kind - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - */ - Object.defineProperty(Suggestion.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["placePrediction", "queryPrediction"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * Creates a new Suggestion instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion instance - */ - Suggestion.create = function create(properties) { - return new Suggestion(properties); - }; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.placePrediction != null && Object.hasOwnProperty.call(message, "placePrediction")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.encode(message.placePrediction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.queryPrediction != null && Object.hasOwnProperty.call(message, "queryPrediction")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.encode(message.queryPrediction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Suggestion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Decodes a Suggestion message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.decode(reader, reader.uint32()); - break; - } - case 2: { - message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; - /** - * Decodes a Suggestion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Suggestion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; - /** - * Verifies a Suggestion message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Suggestion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { - properties.kind = 1; - { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify(message.placePrediction); - if (error) - return "placePrediction." + error; - } - } - if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify(message.queryPrediction); - if (error) - return "queryPrediction." + error; - } - } - return null; - }; + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a Suggestion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion - */ - Suggestion.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion(); - if (object.placePrediction != null) { - if (typeof object.placePrediction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.placePrediction: object expected"); - message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.fromObject(object.placePrediction); - } - if (object.queryPrediction != null) { - if (typeof object.queryPrediction !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.queryPrediction: object expected"); - message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.fromObject(object.queryPrediction); - } - return message; - }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; - /** - * Creates a plain object from a Suggestion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} message Suggestion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Suggestion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) { - object.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.toObject(message.placePrediction, options); - if (options.oneofs) - object.kind = "placePrediction"; - } - if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) { - object.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.toObject(message.queryPrediction, options); - if (options.oneofs) - object.kind = "queryPrediction"; - } - return object; - }; + return EnumValueDescriptorProto; + })(); - /** - * Converts this Suggestion to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @instance - * @returns {Object.} JSON object - */ - Suggestion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.ServiceDescriptorProto = (function() { - /** - * Gets the default type url for Suggestion - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Suggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion"; - }; + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ - Suggestion.StringRange = (function() { + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a StringRange. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IStringRange - * @property {number|null} [startOffset] StringRange startOffset - * @property {number|null} [endOffset] StringRange endOffset - */ + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * Constructs a new StringRange. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a StringRange. - * @implements IStringRange - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set - */ - function StringRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * StringRange startOffset. - * @member {number} startOffset - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - */ - StringRange.prototype.startOffset = 0; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * StringRange endOffset. - * @member {number} endOffset - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - */ - StringRange.prototype.endOffset = 0; + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; - /** - * Creates a new StringRange instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange instance - */ - StringRange.create = function create(properties) { - return new StringRange(properties); - }; + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startOffset); - if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endOffset); - return writer; - }; + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a StringRange message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startOffset = reader.int32(); - break; - } - case 2: { - message.endOffset = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a StringRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; - /** - * Verifies a StringRange message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - if (!$util.isInteger(message.startOffset)) - return "startOffset: integer expected"; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - if (!$util.isInteger(message.endOffset)) - return "endOffset: integer expected"; - return null; - }; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * Creates a StringRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange - */ - StringRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange(); - if (object.startOffset != null) - message.startOffset = object.startOffset | 0; - if (object.endOffset != null) - message.endOffset = object.endOffset | 0; - return message; - }; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; - /** - * Creates a plain object from a StringRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} message StringRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startOffset = 0; - object.endOffset = 0; - } - if (message.startOffset != null && message.hasOwnProperty("startOffset")) - object.startOffset = message.startOffset; - if (message.endOffset != null && message.hasOwnProperty("endOffset")) - object.endOffset = message.endOffset; - return object; - }; + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this StringRange to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @instance - * @returns {Object.} JSON object - */ - StringRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; - /** - * Gets the default type url for StringRange - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange"; - }; + return ServiceDescriptorProto; + })(); - return StringRange; - })(); + protobuf.MethodDescriptorProto = (function() { - Suggestion.FormattableText = (function() { + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ - /** - * Properties of a FormattableText. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IFormattableText - * @property {string|null} [text] FormattableText text - * @property {Array.|null} [matches] FormattableText matches - */ + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new FormattableText. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a FormattableText. - * @implements IFormattableText - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set - */ - function FormattableText(properties) { - this.matches = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * FormattableText text. - * @member {string} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - */ - FormattableText.prototype.text = ""; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * FormattableText matches. - * @member {Array.} matches - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - */ - FormattableText.prototype.matches = $util.emptyArray; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Creates a new FormattableText instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText instance - */ - FormattableText.create = function create(properties) { - return new FormattableText(properties); - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormattableText.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.matches != null && message.matches.length) - for (var i = 0; i < message.matches.length; ++i) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.encode(message.matches[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - /** - * Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FormattableText.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - /** - * Decodes a FormattableText message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormattableText.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = reader.string(); - break; - } - case 2: { - if (!(message.matches && message.matches.length)) - message.matches = []; - message.matches.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; - /** - * Decodes a FormattableText message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FormattableText.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; - /** - * Verifies a FormattableText message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FormattableText.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.matches != null && message.hasOwnProperty("matches")) { - if (!Array.isArray(message.matches)) - return "matches: array expected"; - for (var i = 0; i < message.matches.length; ++i) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify(message.matches[i]); - if (error) - return "matches." + error; - } - } - return null; - }; + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a FormattableText message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText - */ - FormattableText.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText(); - if (object.text != null) - message.text = String(object.text); - if (object.matches) { - if (!Array.isArray(object.matches)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: array expected"); - message.matches = []; - for (var i = 0; i < object.matches.length; ++i) { - if (typeof object.matches[i] !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: object expected"); - message.matches[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.fromObject(object.matches[i]); - } - } - return message; - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a FormattableText message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} message FormattableText - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FormattableText.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.matches = []; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.matches && message.matches.length) { - object.matches = []; - for (var j = 0; j < message.matches.length; ++j) - object.matches[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.toObject(message.matches[j], options); - } - return object; - }; + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this FormattableText to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @instance - * @returns {Object.} JSON object - */ - FormattableText.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; - /** - * Gets the default type url for FormattableText - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FormattableText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText"; - }; + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - return FormattableText; - })(); + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - Suggestion.StructuredFormat = (function() { + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a StructuredFormat. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IStructuredFormat - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [mainText] StructuredFormat mainText - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [secondaryText] StructuredFormat secondaryText - */ + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; - /** - * Constructs a new StructuredFormat. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a StructuredFormat. - * @implements IStructuredFormat - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set - */ - function StructuredFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return MethodDescriptorProto; + })(); - /** - * StructuredFormat mainText. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} mainText - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - */ - StructuredFormat.prototype.mainText = null; + protobuf.FileOptions = (function() { - /** - * StructuredFormat secondaryText. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} secondaryText - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - */ - StructuredFormat.prototype.secondaryText = null; + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - /** - * Creates a new StructuredFormat instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat instance - */ - StructuredFormat.create = function create(properties) { - return new StructuredFormat(properties); - }; + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StructuredFormat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mainText != null && Object.hasOwnProperty.call(message, "mainText")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.mainText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.secondaryText != null && Object.hasOwnProperty.call(message, "secondaryText")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.secondaryText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - /** - * Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StructuredFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - /** - * Decodes a StructuredFormat message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StructuredFormat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Decodes a StructuredFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StructuredFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * Verifies a StructuredFormat message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StructuredFormat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mainText != null && message.hasOwnProperty("mainText")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.mainText); - if (error) - return "mainText." + error; - } - if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.secondaryText); - if (error) - return "secondaryText." + error; - } - return null; - }; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat - */ - StructuredFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat(); - if (object.mainText != null) { - if (typeof object.mainText !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.mainText: object expected"); - message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.mainText); - } - if (object.secondaryText != null) { - if (typeof object.secondaryText !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.secondaryText: object expected"); - message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.secondaryText); - } - return message; - }; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * Creates a plain object from a StructuredFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} message StructuredFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StructuredFormat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mainText = null; - object.secondaryText = null; - } - if (message.mainText != null && message.hasOwnProperty("mainText")) - object.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.mainText, options); - if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) - object.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.secondaryText, options); - return object; - }; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * Converts this StructuredFormat to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @instance - * @returns {Object.} JSON object - */ - StructuredFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Gets the default type url for StructuredFormat - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StructuredFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat"; - }; + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - return StructuredFormat; - })(); + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - Suggestion.PlacePrediction = (function() { + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * Properties of a PlacePrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IPlacePrediction - * @property {string|null} [place] PlacePrediction place - * @property {string|null} [placeId] PlacePrediction placeId - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] PlacePrediction text - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] PlacePrediction structuredFormat - * @property {Array.|null} [types] PlacePrediction types - * @property {number|null} [distanceMeters] PlacePrediction distanceMeters - */ + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * Constructs a new PlacePrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a PlacePrediction. - * @implements IPlacePrediction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set - */ - function PlacePrediction(properties) { - this.types = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * PlacePrediction place. - * @member {string} place - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.place = ""; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * PlacePrediction placeId. - * @member {string} placeId - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.placeId = ""; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * PlacePrediction text. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.text = null; + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * PlacePrediction structuredFormat. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.structuredFormat = null; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * PlacePrediction types. - * @member {Array.} types - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.types = $util.emptyArray; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * PlacePrediction distanceMeters. - * @member {number} distanceMeters - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - */ - PlacePrediction.prototype.distanceMeters = 0; + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; - /** - * Creates a new PlacePrediction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction instance - */ - PlacePrediction.create = function create(properties) { - return new PlacePrediction(properties); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacePrediction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.place != null && Object.hasOwnProperty.call(message, "place")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.place); - if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.types != null && message.types.length) - for (var i = 0; i < message.types.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); - if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.distanceMeters); - return writer; - }; + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - /** - * Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlacePrediction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; - /** - * Decodes a PlacePrediction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacePrediction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.place = reader.string(); - break; - } - case 2: { - message.placeId = reader.string(); - break; - } - case 3: { - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 4: { - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.string()); - break; - } - case 6: { - message.distanceMeters = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - /** - * Decodes a PlacePrediction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlacePrediction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Verifies a PlacePrediction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlacePrediction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.place != null && message.hasOwnProperty("place")) - if (!$util.isString(message.place)) - return "place: string expected"; - if (message.placeId != null && message.hasOwnProperty("placeId")) - if (!$util.isString(message.placeId)) - return "placeId: string expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); - if (error) - return "text." + error; - } - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); - if (error) - return "structuredFormat." + error; - } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - if (!$util.isString(message.types[i])) - return "types: string[] expected"; - } - if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) - if (!$util.isInteger(message.distanceMeters)) - return "distanceMeters: integer expected"; - return null; - }; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction - */ - PlacePrediction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction(); - if (object.place != null) - message.place = String(object.place); - if (object.placeId != null) - message.placeId = String(object.placeId); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.text: object expected"); - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); - } - if (object.structuredFormat != null) { - if (typeof object.structuredFormat !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.structuredFormat: object expected"); - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); - } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - message.types[i] = String(object.types[i]); - } - if (object.distanceMeters != null) - message.distanceMeters = object.distanceMeters | 0; - return message; - }; + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; - /** - * Creates a plain object from a PlacePrediction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} message PlacePrediction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlacePrediction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) { - object.place = ""; - object.placeId = ""; - object.text = null; - object.structuredFormat = null; - object.distanceMeters = 0; - } - if (message.place != null && message.hasOwnProperty("place")) - object.place = message.place; - if (message.placeId != null && message.hasOwnProperty("placeId")) - object.placeId = message.placeId; - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) - object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = message.types[j]; - } - if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters")) - object.distanceMeters = message.distanceMeters; - return object; - }; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * Converts this PlacePrediction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @instance - * @returns {Object.} JSON object - */ - PlacePrediction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - /** - * Gets the default type url for PlacePrediction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlacePrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction"; - }; + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PlacePrediction; - })(); + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; - Suggestion.QueryPrediction = (function() { + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); - /** - * Properties of a QueryPrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @interface IQueryPrediction - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] QueryPrediction text - * @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] QueryPrediction structuredFormat - */ + return FileOptions; + })(); - /** - * Constructs a new QueryPrediction. - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion - * @classdesc Represents a QueryPrediction. - * @implements IQueryPrediction - * @constructor - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set - */ - function QueryPrediction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.MessageOptions = (function() { - /** - * QueryPrediction text. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - */ - QueryPrediction.prototype.text = null; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * QueryPrediction structuredFormat. - * @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - */ - QueryPrediction.prototype.structuredFormat = null; + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new QueryPrediction instance using the specified properties. - * @function create - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction instance - */ - QueryPrediction.create = function create(properties) { - return new QueryPrediction(properties); - }; + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @function encode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPrediction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat")) - $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - /** - * Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPrediction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * Decodes a QueryPrediction message from the specified reader or buffer. - * @function decode - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPrediction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32()); - break; - } - case 2: { - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - /** - * Decodes a QueryPrediction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPrediction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - /** - * Verifies a QueryPrediction message. - * @function verify - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPrediction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text); - if (error) - return "text." + error; - } - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) { - var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat); - if (error) - return "structuredFormat." + error; - } - return null; - }; + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; - /** - * Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {Object.} object Plain object - * @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction - */ - QueryPrediction.fromObject = function fromObject(object) { - if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction) - return object; - var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.text: object expected"); - message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text); - } - if (object.structuredFormat != null) { - if (typeof object.structuredFormat !== "object") - throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.structuredFormat: object expected"); - message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat); - } - return message; - }; + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a plain object from a QueryPrediction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} message QueryPrediction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPrediction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = null; - object.structuredFormat = null; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options); - if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) - object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options); - return object; - }; + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; - /** - * Converts this QueryPrediction to JSON. - * @function toJSON - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @instance - * @returns {Object.} JSON object - */ - QueryPrediction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; - /** - * Gets the default type url for QueryPrediction - * @function getTypeUrl - * @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryPrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction"; - }; + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; - return QueryPrediction; - })(); + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return Suggestion; - })(); + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return AutocompletePlacesResponse; - })(); + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return v1; - })(); + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; - return places; - })(); + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; - return maps; - })(); + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - google.api = (function() { + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; + return MessageOptions; })(); - api.ResourceDescriptor = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior */ /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28364,173 +30272,296 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.type = ""; + FieldOptions.prototype.ctype = 0; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + FieldOptions.prototype.packed = false; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.nameField = ""; + FieldOptions.prototype.jstype = 0; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.history = 0; + FieldOptions.prototype.lazy = false; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.plural = ""; + FieldOptions.prototype.unverifiedLazy = false; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.singular = ""; + FieldOptions.prototype.deprecated = false; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + FieldOptions.prototype.weak = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + FieldOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.ctype = reader.int32(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); break; } case 3: { - message.nameField = reader.string(); + message.deprecated = reader.bool(); break; } - case 4: { - message.history = reader.int32(); + case 10: { + message.weak = reader.bool(); break; } - case 5: { - message.plural = reader.string(); + case 16: { + message.debugRedact = reader.bool(); break; } - case 6: { - message.singular = reader.string(); + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) - message.style.push(reader.int32()); + message[".google.api.fieldBehavior"].push(reader.int32()); } else - message.style.push(reader.int32()); + message[".google.api.fieldBehavior"].push(reader.int32()); break; } default: @@ -28542,69 +30573,141 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + FieldOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { default: - return "history: enum value expected"; + return "ctype: enum value expected"; case 0: case 1: case 2: break; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { default: - return "style: enum value[] expected"; + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; case 0: case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: break; } } @@ -28612,685 +30715,719 @@ }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.FieldOptions} FieldOptions */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { default: - if (typeof object.history === "number") { - message.history = object.history; + if (typeof object.jstype === "number") { + message.jstype = object.jstype; break; } break; - case "HISTORY_UNSPECIFIED": + case "JS_NORMAL": case 0: - message.history = 0; + message.jstype = 0; break; - case "ORIGINALLY_SINGLE_PATTERN": + case "JS_STRING": case 1: - message.history = 1; + message.jstype = 1; break; - case "FUTURE_MULTI_PATTERN": + case "JS_NUMBER": case 2: - message.history = 2; + message.jstype = 2; break; } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; break; } - case "STYLE_UNSPECIFIED": + case "TARGET_TYPE_UNKNOWN": case 0: - message.style[i] = 0; + message.targets[i] = 0; break; - case "DECLARATIVE_FRIENDLY": + case "TARGET_TYPE_FILE": case 1: - message.style[i] = 1; + message.targets[i] = 1; break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; break; - } - case 2: { - message.childType = reader.string(); + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; break; } - default: - reader.skipType(tag & 7); - break; + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); } } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } return message; }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.FieldOptions * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } if (options.defaults) { - object.type = ""; - object.childType = ""; + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for FieldOptions * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; - return ResourceReference; - })(); - - api.Http = (function() { - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value */ - Http.prototype.rules = $util.emptyArray; + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value */ - Http.prototype.fullyDecodeReservedExpansion = false; + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; + FieldOptions.EditionDefault = (function() { - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: break; } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; break; } - default: - reader.skipType(tag & 7); + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; break; } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (object.value != null) + message.value = String(object.value); + return message; + }; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; + }; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; + return EditionDefault; + })(); - return Http; + return FieldOptions; })(); - api.HttpRule = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function OneofOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29298,218 +31435,92 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + OneofOptions.prototype.features = null; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -29521,255 +31532,158 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "additionalBindings." + error; + return "uninterpretedOption." + error; } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.OneofOptions} OneofOptions */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for OneofOptions * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.protobuf.OneofOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.protobuf.OneofOptions"; }; - return HttpRule; + return OneofOptions; })(); - api.CustomHttpPattern = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29777,89 +31691,134 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - CustomHttpPattern.prototype.kind = ""; + EnumOptions.prototype.allowAlias = false; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - CustomHttpPattern.prototype.path = ""; + EnumOptions.prototype.deprecated = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + EnumOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); + case 2: { + message.allowAlias = reader.bool(); break; } - case 2: { - message.path = reader.string(); + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -29871,133 +31830,182 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + EnumOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.EnumOptions} EnumOptions */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for EnumOptions * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; - return CustomHttpPattern; + return EnumOptions; })(); - api.CommonLanguageSettings = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function CommonLanguageSettings(properties) { - this.destinations = []; + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30005,100 +32013,120 @@ } /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; + EnumValueOptions.prototype.deprecated = false; /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions * @instance */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; + EnumValueOptions.prototype.features = null; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommonLanguageSettings.decode = function decode(reader, length) { + EnumValueOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.referenceDocsUri = reader.string(); + message.deprecated = reader.bool(); break; } case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -30110,177 +32138,175 @@ }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommonLanguageSettings message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommonLanguageSettings.verify = function verify(message) { + EnumValueOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } return null; }; /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } return message; }; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return CommonLanguageSettings; + return EnumValueOptions; })(); - api.ClientLibrarySettings = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function ClientLibrarySettings(properties) { + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30288,215 +32314,134 @@ } /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions * @instance */ - ClientLibrarySettings.prototype.pythonSettings = null; + ServiceOptions.prototype.features = null; /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - ClientLibrarySettings.prototype.nodeSettings = null; + ServiceOptions.prototype.deprecated = false; /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - ClientLibrarySettings.prototype.dotnetSettings = null; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - ClientLibrarySettings.prototype.rubySettings = null; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - ClientLibrarySettings.prototype.goSettings = null; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientLibrarySettings.decode = function decode(reader, length) { + ServiceOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + case 33: { + message.deprecated = reader.bool(); break; } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + case 1049: { + message[".google.api.defaultHost"] = reader.string(); break; } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); break; } default: @@ -30508,304 +32453,185 @@ }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientLibrarySettings message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientLibrarySettings.verify = function verify(message) { + ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) - return "rubySettings." + error; + return "features." + error; } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this ClientLibrarySettings to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return ClientLibrarySettings; + return ServiceOptions; })(); - api.Publishing = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30813,210 +32639,151 @@ } /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.githubLabel = ""; + MethodOptions.prototype.deprecated = false; /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.docTagPrefix = ""; + MethodOptions.prototype.features = null; /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.organization = 0; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.librarySettings = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - Publishing.prototype.protoReferenceDocumentationUri = ""; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - Publishing.create = function create(properties) { - return new Publishing(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Publishing.decode = function decode(reader, length) { + MethodOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); + case 34: { + message.idempotencyLevel = reader.int32(); break; } - case 106: { - message.docTagPrefix = reader.string(); + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 107: { - message.organization = reader.int32(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); break; } default: @@ -31028,295 +32795,251 @@ }; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Publishing.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Publishing message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Publishing.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { default: - return "organization: enum value expected"; + return "idempotencyLevel: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - case 7: break; } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "librarySettings." + error; + return "uninterpretedOption." + error; } } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } return null; }; /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing + * @returns {google.protobuf.MethodOptions} MethodOptions */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { default: - if (typeof object.organization === "number") { - message.organization = object.organization; + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; break; } break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case "IDEMPOTENCY_UNKNOWN": case 0: - message.organization = 0; + message.idempotencyLevel = 0; break; - case "CLOUD": + case "NO_SIDE_EFFECTS": case 1: - message.organization = 1; + message.idempotencyLevel = 1; break; - case "ADS": + case "IDEMPOTENT": case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; + message.idempotencyLevel = 2; break; } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } return message; }; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static - * @param {google.api.Publishing} message Publishing + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; } if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this Publishing to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - Publishing.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Publishing + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.api.Publishing + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Publishing"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return Publishing; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; })(); - api.JavaSettings = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function JavaSettings(properties) { - this.serviceClassNames = {}; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31324,123 +33047,162 @@ } /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - JavaSettings.prototype.libraryPackage = ""; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; + UninterpretedOption.prototype.identifierValue = ""; /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - JavaSettings.prototype.common = null; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new JavaSettings instance using the specified properties. + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JavaSettings.decode = function decode(reader, length) { + UninterpretedOption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); break; } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); break; } default: @@ -31452,159 +33214,458 @@ }; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JavaSettings message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JavaSettings.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; }; /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.JavaSettings} message JavaSettings + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; + if (options.arrays || options.defaults) + object.name = []; if (options.defaults) { - object.libraryPackage = ""; - object.common = null; + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this JavaSettings to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - JavaSettings.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for UninterpretedOption * @function getTypeUrl - * @memberof google.api.JavaSettings + * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.JavaSettings"; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - return JavaSettings; + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; })(); - api.CppSettings = (function() { + protobuf.FeatureSet = (function() { /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat */ /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ - function CppSettings(properties) { + function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31612,75 +33673,145 @@ } /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet * @instance */ - CppSettings.prototype.common = null; + FeatureSet.prototype.jsonFormat = 0; /** - * Creates a new CppSettings instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @function create - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); }; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + FeatureSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); return writer; }; /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @function decode - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings + * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CppSettings.decode = function decode(reader, length) { + FeatureSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); break; } default: @@ -31692,127 +33823,413 @@ }; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings + * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { + FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CppSettings message. + * Verifies a FeatureSet message. * @function verify - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CppSettings.verify = function verify(message) { + FeatureSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings + * @returns {google.protobuf.FeatureSet} FeatureSet */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; } return message; }; /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static - * @param {google.api.CppSettings} message CppSettings + * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + FeatureSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; return object; }; /** - * Converts this CppSettings to JSON. + * Converts this FeatureSet to JSON. * @function toJSON - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ - CppSettings.prototype.toJSON = function toJSON() { + FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CppSettings + * Gets the default type url for FeatureSet * @function getTypeUrl - * @memberof google.api.CppSettings + * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CppSettings"; + return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; - return CppSettings; + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; })(); - api.PhpSettings = (function() { + protobuf.FeatureSetDefaults = (function() { /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition */ /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set */ - function PhpSettings(properties) { + function FeatureSetDefaults(properties) { + this.defaults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31820,75 +34237,106 @@ } /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - PhpSettings.prototype.common = null; + FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** - * Creates a new PhpSettings instance using the specified properties. + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. * @function create - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); }; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer) { + FeatureSetDefaults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); return writer; }; /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhpSettings.decode = function decode(reader, length) { + FeatureSetDefaults.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); break; } default: @@ -31900,127 +34348,582 @@ }; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PhpSettings message. + * Verifies a FeatureSetDefaults message. * @function verify - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PhpSettings.verify = function verify(message) { + FeatureSetDefaults.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } return null; }; /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.PhpSettings + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; + }; - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; + return FeatureSetEditionDefault; + })(); - return PhpSettings; + return FeatureSetDefaults; })(); - api.PythonSettings = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function PythonSettings(properties) { + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32028,75 +34931,78 @@ } /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - PythonSettings.prototype.common = null; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new PythonSettings instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PythonSettings message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PythonSettings.decode = function decode(reader, length) { + SourceCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -32108,345 +35014,502 @@ }; /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PythonSettings message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PythonSettings.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } } return null; }; /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } } return message; }; /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.api.PythonSettings} message PythonSettings + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } return object; }; /** - * Converts this PythonSettings to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - PythonSettings.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PythonSettings + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.api.PythonSettings + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.PythonSettings"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - return PythonSettings; - })(); + SourceCodeInfo.Location = (function() { - api.NodeSettings = (function() { + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; + }; - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; + return Location; + })(); - return NodeSettings; + return SourceCodeInfo; })(); - api.DotnetSettings = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32454,194 +35517,78 @@ } /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: @@ -32653,442 +35600,501 @@ }; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DotnetSettings message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DotnetSettings.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } } return null; }; /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } } return message; }; /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.api.DotnetSettings} message DotnetSettings + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; /** - * Converts this DotnetSettings to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - DotnetSettings.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DotnetSettings + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.api.DotnetSettings + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.DotnetSettings"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - return DotnetSettings; - })(); + GeneratedCodeInfo.Annotation = (function() { - api.RubySettings = (function() { + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: break; } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { default: - reader.skipType(tag & 7); + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; break; } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; + return message; + }; - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; + }; - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); - return RubySettings; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - api.GoSettings = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function GoSettings(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33096,75 +36102,89 @@ } /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - GoSettings.prototype.common = null; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GoSettings instance using the specified properties. + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoSettings.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -33176,130 +36196,146 @@ }; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoSettings message. + * Verifies a Timestamp message. * @function verify - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GoSettings.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings + * @returns {google.protobuf.Timestamp} Timestamp */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static - * @param {google.api.GoSettings} message GoSettings + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this GoSettings to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - GoSettings.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GoSettings + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.api.GoSettings + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.GoSettings"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - return GoSettings; + return Timestamp; })(); - api.MethodSettings = (function() { + protobuf.Duration = (function() { /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33307,106 +36343,89 @@ } /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - MethodSettings.prototype.longRunning = null; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + Duration.prototype.nanos = 0; /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodSettings.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.seconds = reader.int64(); break; } case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); + message.nanos = reader.int32(); break; } default: @@ -33418,496 +36437,128 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies a Duration message. * @function verify - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodSettings.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.protobuf.Duration} Duration */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this MethodSettings to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - MethodSettings.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.api.MethodSettings + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return Duration; })(); - return api; + return protobuf; })(); return google; diff --git a/packages/google-maps-places/protos/protos.json b/packages/google-maps-places/protos/protos.json index 8f393a1d4a1..b06808841e9 100644 --- a/packages/google-maps-places/protos/protos.json +++ b/packages/google-maps-places/protos/protos.json @@ -2,1494 +2,394 @@ "nested": { "google": { "nested": { - "protobuf": { + "geo": { + "nested": { + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/geo/type/viewport;viewport", + "java_multiple_files": true, + "java_outer_classname": "ViewportProto", + "java_package": "com.google.geo.type", + "objc_class_prefix": "GGTP" + }, + "nested": { + "Viewport": { + "fields": { + "low": { + "type": "google.type.LatLng", + "id": 1 + }, + "high": { + "type": "google.type.LatLng", + "id": 2 + } + } + } + } + } + } + }, + "type": { "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", "cc_enable_arenas": true, - "optimize_for": "SPEED" + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" }, "nested": { - "Timestamp": { + "LatLng": { "fields": { - "seconds": { - "type": "int64", + "latitude": { + "type": "double", "id": 1 }, - "nanos": { - "type": "int32", + "longitude": { + "type": "double", "id": 2 } } }, - "FileDescriptorSet": { + "LocalizedText": { "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", + "text": { + "type": "string", "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2 } } }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { + "Money": { "fields": { - "name": { + "currencyCode": { "type": "string", "id": 1 }, - "package": { - "type": "string", + "units": { + "type": "int64", "id": 2 }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", + "nanos": { "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 + "id": 3 } } }, - "DescriptorProto": { + "Date": { "fields": { - "name": { - "type": "string", + "year": { + "type": "int32", "id": 1 }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", + "month": { + "type": "int32", "id": 2 }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", + "day": { + "type": "int32", "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 } - }, + } + } + } + }, + "maps": { + "nested": { + "places": { "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Maps.Places.V1", + "go_package": "cloud.google.com/go/maps/places/apiv1/placespb;placespb", + "java_multiple_files": true, + "java_outer_classname": "PlacesServiceProto", + "java_package": "com.google.maps.places.v1", + "objc_class_prefix": "GMPSV1", + "php_namespace": "Google\\Maps\\Places\\V1" + }, + "nested": { + "AuthorAttribution": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "photoUri": { + "type": "string", + "id": 3 + } + } }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 + "ContentBlock": { + "fields": { + "topic": { + "type": "string", + "id": 1 + }, + "content": { + "type": "google.type.LocalizedText", + "id": 2 + }, + "references": { + "type": "References", + "id": 3 + } + } }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 + "References": { + "fields": { + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 1 + }, + "places": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + } + } }, - "fullName": { - "type": "string", - "id": 2 + "Review": { + "options": { + "(google.api.resource).type": "places.googleapis.com/Review", + "(google.api.resource).pattern": "places/{place}/reviews/{review}", + "(google.api.resource).plural": "reviews", + "(google.api.resource).singular": "review" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "relativePublishTimeDescription": { + "type": "string", + "id": 2 + }, + "text": { + "type": "google.type.LocalizedText", + "id": 9 + }, + "originalText": { + "type": "google.type.LocalizedText", + "id": 12 + }, + "rating": { + "type": "double", + "id": 7 + }, + "authorAttribution": { + "type": "AuthorAttribution", + "id": 13 + }, + "publishTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + } + } }, - "type": { - "type": "string", - "id": 3 + "ContextualContent": { + "fields": { + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 1 + }, + "photos": { + "rule": "repeated", + "type": "Photo", + "id": 2 + }, + "justifications": { + "rule": "repeated", + "type": "Justification", + "id": 3 + } + }, + "nested": { + "Justification": { + "oneofs": { + "justification": { + "oneof": [ + "reviewJustification", + "businessAvailabilityAttributesJustification" + ] + } + }, + "fields": { + "reviewJustification": { + "type": "ReviewJustification", + "id": 1 + }, + "businessAvailabilityAttributesJustification": { + "type": "BusinessAvailabilityAttributesJustification", + "id": 2 + } + }, + "nested": { + "ReviewJustification": { + "fields": { + "highlightedText": { + "type": "HighlightedText", + "id": 1 + }, + "review": { + "type": "Review", + "id": 2 + } + }, + "nested": { + "HighlightedText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "highlightedTextRanges": { + "rule": "repeated", + "type": "HighlightedTextRange", + "id": 2 + } + }, + "nested": { + "HighlightedTextRange": { + "fields": { + "startIndex": { + "type": "int32", + "id": 1 + }, + "endIndex": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + }, + "BusinessAvailabilityAttributesJustification": { + "fields": { + "takeout": { + "type": "bool", + "id": 1 + }, + "delivery": { + "type": "bool", + "id": 2 + }, + "dineIn": { + "type": "bool", + "id": 3 + } + } + } + } + } + } }, - "reserved": { - "type": "bool", - "id": 5 + "Photo": { + "options": { + "(google.api.resource).type": "places.googleapis.com/Photo", + "(google.api.resource).pattern": "places/{place}/photos/{photo}", + "(google.api.resource).plural": "photos", + "(google.api.resource).singular": "photo" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "widthPx": { + "type": "int32", + "id": 2 + }, + "heightPx": { + "type": "int32", + "id": 3 + }, + "authorAttributions": { + "rule": "repeated", + "type": "AuthorAttribution", + "id": 4 + } + } }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 9995, - 9999 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "geo": { - "nested": { - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/geo/type/viewport;viewport", - "java_multiple_files": true, - "java_outer_classname": "ViewportProto", - "java_package": "com.google.geo.type", - "objc_class_prefix": "GGTP" - }, - "nested": { - "Viewport": { - "fields": { - "low": { - "type": "google.type.LatLng", - "id": 1 - }, - "high": { - "type": "google.type.LatLng", - "id": 2 - } - } - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/date;date", - "java_multiple_files": true, - "java_outer_classname": "DateProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "LatLng": { - "fields": { - "latitude": { - "type": "double", - "id": 1 - }, - "longitude": { - "type": "double", - "id": 2 - } - } - }, - "Money": { - "fields": { - "currencyCode": { - "type": "string", - "id": 1 - }, - "units": { - "type": "int64", - "id": 2 - }, - "nanos": { - "type": "int32", - "id": 3 - } - } - }, - "LocalizedText": { - "fields": { - "text": { - "type": "string", - "id": 1 - }, - "languageCode": { - "type": "string", - "id": 2 - } - } - }, - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - }, - "maps": { - "nested": { - "places": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Maps.Places.V1", - "go_package": "cloud.google.com/go/maps/places/apiv1/placespb;placespb", - "java_multiple_files": true, - "java_outer_classname": "PlacesServiceProto", - "java_package": "com.google.maps.places.v1", - "objc_class_prefix": "GMPSV1", - "php_namespace": "Google\\Maps\\Places\\V1" - }, - "nested": { - "AuthorAttribution": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "photoUri": { - "type": "string", - "id": 3 - } - } - }, - "EVChargeOptions": { - "fields": { - "connectorCount": { - "type": "int32", - "id": 1 - }, - "connectorAggregation": { - "rule": "repeated", - "type": "ConnectorAggregation", - "id": 2 - } - }, - "nested": { - "ConnectorAggregation": { - "oneofs": { - "_availableCount": { - "oneof": [ - "availableCount" - ] - }, - "_outOfServiceCount": { - "oneof": [ - "outOfServiceCount" - ] - } - }, - "fields": { - "type": { - "type": "EVConnectorType", - "id": 1 - }, - "maxChargeRateKw": { - "type": "double", - "id": 2 - }, - "count": { - "type": "int32", - "id": 3 - }, - "availableCount": { - "type": "int32", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "outOfServiceCount": { - "type": "int32", - "id": 5, - "options": { - "proto3_optional": true - } - }, - "availabilityLastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - } - } - } + "EVChargeOptions": { + "fields": { + "connectorCount": { + "type": "int32", + "id": 1 + }, + "connectorAggregation": { + "rule": "repeated", + "type": "ConnectorAggregation", + "id": 2 + } + }, + "nested": { + "ConnectorAggregation": { + "oneofs": { + "_availableCount": { + "oneof": [ + "availableCount" + ] + }, + "_outOfServiceCount": { + "oneof": [ + "outOfServiceCount" + ] + } + }, + "fields": { + "type": { + "type": "EVConnectorType", + "id": 1 + }, + "maxChargeRateKw": { + "type": "double", + "id": 2 + }, + "count": { + "type": "int32", + "id": 3 + }, + "availableCount": { + "type": "int32", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "outOfServiceCount": { + "type": "int32", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "availabilityLastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + } + } }, "EVConnectorType": { "values": { @@ -1575,36 +475,6 @@ } } }, - "Photo": { - "options": { - "(google.api.resource).type": "places.googleapis.com/Photo", - "(google.api.resource).pattern": "places/{place}/photos/{photo}", - "(google.api.resource).plural": "photos", - "(google.api.resource).singular": "photo" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "widthPx": { - "type": "int32", - "id": 2 - }, - "heightPx": { - "type": "int32", - "id": 3 - }, - "authorAttributions": { - "rule": "repeated", - "type": "AuthorAttribution", - "id": 4 - } - } - }, "Place": { "options": { "(google.api.resource).type": "places.googleapis.com/Place", @@ -2074,6 +944,14 @@ "evChargeOptions": { "type": "EVChargeOptions", "id": 79 + }, + "generativeSummary": { + "type": "GenerativeSummary", + "id": 80 + }, + "areaSummary": { + "type": "AreaSummary", + "id": 81 } }, "nested": { @@ -2471,57 +1349,44 @@ } } } - } - } - }, - "PriceLevel": { - "values": { - "PRICE_LEVEL_UNSPECIFIED": 0, - "PRICE_LEVEL_FREE": 1, - "PRICE_LEVEL_INEXPENSIVE": 2, - "PRICE_LEVEL_MODERATE": 3, - "PRICE_LEVEL_EXPENSIVE": 4, - "PRICE_LEVEL_VERY_EXPENSIVE": 5 - } - }, - "Review": { - "options": { - "(google.api.resource).type": "places.googleapis.com/Review", - "(google.api.resource).pattern": "places/{place}/reviews/{review}", - "(google.api.resource).plural": "reviews", - "(google.api.resource).singular": "review" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "relativePublishTimeDescription": { - "type": "string", - "id": 2 - }, - "text": { - "type": "google.type.LocalizedText", - "id": 9 - }, - "originalText": { - "type": "google.type.LocalizedText", - "id": 12 - }, - "rating": { - "type": "double", - "id": 7 }, - "authorAttribution": { - "type": "AuthorAttribution", - "id": 13 + "GenerativeSummary": { + "fields": { + "overview": { + "type": "google.type.LocalizedText", + "id": 1 + }, + "description": { + "type": "google.type.LocalizedText", + "id": 2 + }, + "references": { + "type": "References", + "id": 3 + } + } }, - "publishTime": { - "type": "google.protobuf.Timestamp", - "id": 14 + "AreaSummary": { + "fields": { + "contentBlocks": { + "rule": "repeated", + "type": "ContentBlock", + "id": 4 + } + } } } }, + "PriceLevel": { + "values": { + "PRICE_LEVEL_UNSPECIFIED": 0, + "PRICE_LEVEL_FREE": 1, + "PRICE_LEVEL_INEXPENSIVE": 2, + "PRICE_LEVEL_MODERATE": 3, + "PRICE_LEVEL_EXPENSIVE": 4, + "PRICE_LEVEL_VERY_EXPENSIVE": 5 + } + }, "Places": { "options": { "(google.api.default_host)": "places.googleapis.com" @@ -2739,30 +1604,267 @@ "type": "bool", "id": 12 }, - "locationBias": { - "type": "LocationBias", - "id": 13 + "locationBias": { + "type": "LocationBias", + "id": 13 + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 14 + }, + "evOptions": { + "type": "EVOptions", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RankPreference": { + "values": { + "RANK_PREFERENCE_UNSPECIFIED": 0, + "DISTANCE": 1, + "RELEVANCE": 2 + } + }, + "LocationBias": { + "oneofs": { + "type": { + "oneof": [ + "rectangle", + "circle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 + } + } + }, + "LocationRestriction": { + "oneofs": { + "type": { + "oneof": [ + "rectangle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + } + } + }, + "EVOptions": { + "fields": { + "minimumChargingRateKw": { + "type": "double", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "connectorTypes": { + "rule": "repeated", + "type": "EVConnectorType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SearchTextResponse": { + "fields": { + "places": { + "rule": "repeated", + "type": "Place", + "id": 1 + }, + "contextualContents": { + "rule": "repeated", + "type": "ContextualContent", + "id": 3 + } + } + }, + "GetPhotoMediaRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "places.googleapis.com/PhotoMedia" + } + }, + "maxWidthPx": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxHeightPx": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skipHttpRedirect": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PhotoMedia": { + "options": { + "(google.api.resource).type": "places.googleapis.com/PhotoMedia", + "(google.api.resource).pattern": "places/{place_id}/photos/{photo_reference}/media", + "(google.api.resource).plural": "photoMedias", + "(google.api.resource).singular": "photoMedia" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "photoUri": { + "type": "string", + "id": 2 + } + } + }, + "GetPlaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "regionCode": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sessionToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AutocompletePlacesRequest": { + "fields": { + "input": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "locationBias": { + "type": "LocationBias", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includedPrimaryTypes": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includedRegionCodes": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "languageCode": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "regionCode": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "origin": { + "type": "google.type.LatLng", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inputOffset": { + "type": "int32", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "locationRestriction": { - "type": "LocationRestriction", - "id": 14 + "includeQueryPredictions": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "evOptions": { - "type": "EVOptions", - "id": 15, + "sessionToken": { + "type": "string", + "id": 11, "options": { "(google.api.field_behavior)": "OPTIONAL" } } }, "nested": { - "RankPreference": { - "values": { - "RANK_PREFERENCE_UNSPECIFIED": 0, - "DISTANCE": 1, - "RELEVANCE": 2 - } - }, "LocationBias": { "oneofs": { "type": { @@ -2787,7 +1889,8 @@ "oneofs": { "type": { "oneof": [ - "rectangle" + "rectangle", + "circle" ] } }, @@ -2795,854 +1898,1922 @@ "rectangle": { "type": "google.geo.type.Viewport", "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 } } - }, - "EVOptions": { + } + } + }, + "AutocompletePlacesResponse": { + "fields": { + "suggestions": { + "rule": "repeated", + "type": "Suggestion", + "id": 1 + } + }, + "nested": { + "Suggestion": { + "oneofs": { + "kind": { + "oneof": [ + "placePrediction", + "queryPrediction" + ] + } + }, "fields": { - "minimumChargingRateKw": { - "type": "double", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "placePrediction": { + "type": "PlacePrediction", + "id": 1 + }, + "queryPrediction": { + "type": "QueryPrediction", + "id": 2 + } + }, + "nested": { + "StringRange": { + "fields": { + "startOffset": { + "type": "int32", + "id": 1 + }, + "endOffset": { + "type": "int32", + "id": 2 + } } }, - "connectorTypes": { - "rule": "repeated", - "type": "EVConnectorType", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "FormattableText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "matches": { + "rule": "repeated", + "type": "StringRange", + "id": 2 + } + } + }, + "StructuredFormat": { + "fields": { + "mainText": { + "type": "FormattableText", + "id": 1 + }, + "secondaryText": { + "type": "FormattableText", + "id": 2 + } + } + }, + "PlacePrediction": { + "fields": { + "place": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "places.googleapis.com/Place" + } + }, + "placeId": { + "type": "string", + "id": 2 + }, + "text": { + "type": "FormattableText", + "id": 3 + }, + "structuredFormat": { + "type": "StructuredFormat", + "id": 4 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "distanceMeters": { + "type": "int32", + "id": 6 + } + } + }, + "QueryPrediction": { + "fields": { + "text": { + "type": "FormattableText", + "id": 1 + }, + "structuredFormat": { + "type": "StructuredFormat", + "id": 2 + } } } } } } + } + } + } + } + } + } + }, + "api": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "SearchTextResponse": { - "fields": { - "places": { - "rule": "repeated", - "type": "Place", - "id": 1 - } - } + "end": { + "type": "int32", + "id": 2 }, - "GetPhotoMediaRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "places.googleapis.com/PhotoMedia" - } - }, - "maxWidthPx": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxHeightPx": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "skipHttpRedirect": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "PhotoMedia": { - "options": { - "(google.api.resource).type": "places.googleapis.com/PhotoMedia", - "(google.api.resource).pattern": "places/{place_id}/photos/{photo_reference}/media", - "(google.api.resource).plural": "photoMedias", - "(google.api.resource).singular": "photoMedia" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "photoUri": { - "type": "string", - "id": 2 - } - } + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 }, - "GetPlaceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - }, - "languageCode": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "regionCode": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sessionToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "AutocompletePlacesRequest": { - "fields": { - "input": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "locationBias": { - "type": "LocationBias", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "locationRestriction": { - "type": "LocationRestriction", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includedPrimaryTypes": { - "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includedRegionCodes": { - "rule": "repeated", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "languageCode": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "regionCode": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "origin": { - "type": "google.type.LatLng", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "inputOffset": { - "type": "int32", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "includeQueryPredictions": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "sessionToken": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "LocationBias": { - "oneofs": { - "type": { - "oneof": [ - "rectangle", - "circle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - }, - "circle": { - "type": "Circle", - "id": 2 - } - } - }, - "LocationRestriction": { - "oneofs": { - "type": { - "oneof": [ - "rectangle", - "circle" - ] - } - }, - "fields": { - "rectangle": { - "type": "google.geo.type.Viewport", - "id": 1 - }, - "circle": { - "type": "Circle", - "id": 2 - } - } - } - } + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 }, - "AutocompletePlacesResponse": { - "fields": { - "suggestions": { - "rule": "repeated", - "type": "Suggestion", - "id": 1 - } - }, - "nested": { - "Suggestion": { - "oneofs": { - "kind": { - "oneof": [ - "placePrediction", - "queryPrediction" - ] - } - }, - "fields": { - "placePrediction": { - "type": "PlacePrediction", - "id": 1 - }, - "queryPrediction": { - "type": "QueryPrediction", - "id": 2 - } - }, - "nested": { - "StringRange": { - "fields": { - "startOffset": { - "type": "int32", - "id": 1 - }, - "endOffset": { - "type": "int32", - "id": 2 - } - } - }, - "FormattableText": { - "fields": { - "text": { - "type": "string", - "id": 1 - }, - "matches": { - "rule": "repeated", - "type": "StringRange", - "id": 2 - } - } - }, - "StructuredFormat": { - "fields": { - "mainText": { - "type": "FormattableText", - "id": 1 - }, - "secondaryText": { - "type": "FormattableText", - "id": 2 - } - } - }, - "PlacePrediction": { - "fields": { - "place": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "places.googleapis.com/Place" - } - }, - "placeId": { - "type": "string", - "id": 2 - }, - "text": { - "type": "FormattableText", - "id": 3 - }, - "structuredFormat": { - "type": "StructuredFormat", - "id": 4 - }, - "types": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "distanceMeters": { - "type": "int32", - "id": 6 - } - } - }, - "QueryPrediction": { - "fields": { - "text": { - "type": "FormattableText", - "id": 1 - }, - "structuredFormat": { - "type": "StructuredFormat", - "id": 2 - } - } - } - } - } - } + "value": { + "type": "string", + "id": 2 } } } } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" }, - "ResourceDescriptor": { + "OneofOptions": { "fields": { - "type": { - "type": "string", + "features": { + "type": "FeatureSet", "id": 1 }, - "pattern": { + "uninterpretedOption": { "rule": "repeated", - "type": "string", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", "id": 2 }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } }, - "plural": { - "type": "string", - "id": 5 + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } }, - "singular": { - "type": "string", - "id": 6 + "features": { + "type": "FeatureSet", + "id": 7 }, - "style": { + "uninterpretedOption": { "rule": "repeated", - "type": "Style", - "id": 10 + "type": "UninterpretedOption", + "id": 999 } }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false } }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 } - } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] }, - "ResourceReference": { + "ServiceOptions": { "fields": { - "type": { - "type": "string", - "id": 1 + "features": { + "type": "FeatureSet", + "id": 34 }, - "childType": { - "type": "string", - "id": 2 + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 } - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] }, - "Http": { + "MethodOptions": { "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { + "deprecated": { "type": "bool", - "id": 2 + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } } } }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, + "UninterpretedOption": { "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", + "name": { + "rule": "repeated", + "type": "NamePart", "id": 2 }, - "put": { + "identifierValue": { "type": "string", "id": 3 }, - "post": { - "type": "string", + "positiveIntValue": { + "type": "uint64", "id": 4 }, - "delete": { - "type": "string", + "negativeIntValue": { + "type": "int64", "id": 5 }, - "patch": { - "type": "string", + "doubleValue": { + "type": "double", "id": 6 }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", + "stringValue": { + "type": "bytes", "id": 7 }, - "responseBody": { + "aggregateValue": { "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 + "id": 8 } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } } } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { + "FeatureSet": { "fields": { - "referenceDocsUri": { - "type": "string", + "fieldPresence": { + "type": "FieldPresence", "id": 1, "options": { - "deprecated": true + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" } }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } }, - "rubySettings": { - "type": "RubySettings", - "id": 27 + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } }, - "goSettings": { - "type": "GoSettings", - "id": 28 + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 9995, + 9999 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } } } }, - "DotnetSettings": { + "FeatureSetDefaults": { "fields": { - "common": { - "type": "CommonLanguageSettings", + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", "id": 1 }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", + "minimumEdition": { + "type": "Edition", "id": 4 }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", + "maximumEdition": { + "type": "Edition", "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } } } }, - "GoSettings": { + "SourceCodeInfo": { "fields": { - "common": { - "type": "CommonLanguageSettings", + "location": { + "rule": "repeated", + "type": "Location", "id": 1 } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } } }, - "MethodSettings": { + "GeneratedCodeInfo": { "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { + "annotation": { "rule": "repeated", - "type": "string", - "id": 3 + "type": "Annotation", + "id": 1 } }, "nested": { - "LongRunning": { + "Annotation": { "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "pollDelayMultiplier": { - "type": "float", + "sourceFile": { + "type": "string", "id": 2 }, - "maxPollDelay": { - "type": "google.protobuf.Duration", + "begin": { + "type": "int32", "id": 3 }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", + "end": { + "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } } }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } } }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } } } } diff --git a/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js b/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js index fdea77cfc5e..94f17586f3f 100644 --- a/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js +++ b/packages/google-maps-places/samples/generated/v1/places.autocomplete_places.js @@ -50,11 +50,11 @@ function main(input) { // const locationRestriction = {} /** * Optional. Included primary Place type (for example, "restaurant" or - * "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * A Place is only returned if its primary type is included in this list. Up - * to 5 values can be specified. If no types are specified, all Place types - * are returned. + * "gas_station") in Place Types + * (https://developers.google.com/maps/documentation/places/web-service/place-types), + * or only `(regions)`, or only `(cities)`. A Place is only returned if its + * primary type is included in this list. Up to 5 values can be specified. If + * no types are specified, all Place types are returned. */ // const includedPrimaryTypes = ['abc','def'] /** diff --git a/packages/google-maps-places/src/v1/places_client.ts b/packages/google-maps-places/src/v1/places_client.ts index 526d55c6f35..0b1d9c22c4d 100644 --- a/packages/google-maps-places/src/v1/places_client.ts +++ b/packages/google-maps-places/src/v1/places_client.ts @@ -960,11 +960,11 @@ export class PlacesClient { * signal. * @param {string[]} [request.includedPrimaryTypes] * Optional. Included primary Place type (for example, "restaurant" or - * "gas_station") from - * https://developers.google.com/maps/documentation/places/web-service/place-types. - * A Place is only returned if its primary type is included in this list. Up - * to 5 values can be specified. If no types are specified, all Place types - * are returned. + * "gas_station") in Place Types + * (https://developers.google.com/maps/documentation/places/web-service/place-types), + * or only `(regions)`, or only `(cities)`. A Place is only returned if its + * primary type is included in this list. Up to 5 values can be specified. If + * no types are specified, all Place types are returned. * @param {string[]} [request.includedRegionCodes] * Optional. Only include results in the specified regions, specified as up to * 15 CLDR two-character region codes. An empty set will not restrict the diff --git a/packages/google-maps-places/src/v1/places_proto_list.json b/packages/google-maps-places/src/v1/places_proto_list.json index eec44557c11..241d296eaac 100644 --- a/packages/google-maps-places/src/v1/places_proto_list.json +++ b/packages/google-maps-places/src/v1/places_proto_list.json @@ -1,11 +1,14 @@ [ "../../protos/google/geo/type/viewport.proto", "../../protos/google/maps/places/v1/attribution.proto", + "../../protos/google/maps/places/v1/content_block.proto", + "../../protos/google/maps/places/v1/contextual_content.proto", "../../protos/google/maps/places/v1/ev_charging.proto", "../../protos/google/maps/places/v1/fuel_options.proto", "../../protos/google/maps/places/v1/geometry.proto", "../../protos/google/maps/places/v1/photo.proto", "../../protos/google/maps/places/v1/place.proto", "../../protos/google/maps/places/v1/places_service.proto", + "../../protos/google/maps/places/v1/reference.proto", "../../protos/google/maps/places/v1/review.proto" ]