From 20901ab3af584728d4de140d95a752d0c3456359 Mon Sep 17 00:00:00 2001 From: Alice Li Date: Tue, 9 May 2023 16:09:35 -0400 Subject: [PATCH 1/6] feat: [maps-places] new module for maps-places --- java-maps-places/.OwlBot.yaml | 36 + java-maps-places/.repo-metadata.json | 16 + java-maps-places/README.md | 226 + .../google-maps-places-bom/pom.xml | 44 + java-maps-places/google-maps-places/pom.xml | 114 + .../google/maps/places/v1/PlacesClient.java | 285 + .../google/maps/places/v1/PlacesSettings.java | 203 + .../google/maps/places/v1/gapic_metadata.json | 21 + .../google/maps/places/v1/package-info.java | 58 + .../v1/stub/GrpcPlacesCallableFactory.java | 113 + .../maps/places/v1/stub/GrpcPlacesStub.java | 149 + .../stub/HttpJsonPlacesCallableFactory.java | 105 + .../places/v1/stub/HttpJsonPlacesStub.java | 191 + .../maps/places/v1/stub/PlacesStub.java | 40 + .../places/v1/stub/PlacesStubSettings.java | 311 + .../com/google/maps/places/v1/MockPlaces.java | 59 + .../google/maps/places/v1/MockPlacesImpl.java | 81 + .../places/v1/PlacesClientHttpJsonTest.java | 145 + .../maps/places/v1/PlacesClientTest.java | 157 + .../grpc-google-maps-places-v1/pom.xml | 45 + .../com/google/maps/places/v1/PlacesGrpc.java | 362 + java-maps-places/owlbot.py | 36 + java-maps-places/pom.xml | 53 + .../clirr-ignored-differences.xml | 19 + .../proto-google-maps-places-v1/pom.xml | 37 + .../com/google/maps/places/v1/Circle.java | 816 + .../maps/places/v1/CircleOrBuilder.java | 80 + .../google/maps/places/v1/GeometryProto.java | 79 + .../com/google/maps/places/v1/Int32Range.java | 707 + .../maps/places/v1/Int32RangeOrBuilder.java | 75 + .../java/com/google/maps/places/v1/Place.java | 22277 ++++++++++++++++ .../google/maps/places/v1/PlaceOrBuilder.java | 1321 + .../com/google/maps/places/v1/PlaceProto.java | 357 + .../maps/places/v1/PlacesServiceProto.java | 197 + .../com/google/maps/places/v1/PriceLevel.java | 226 + .../maps/places/v1/SearchTextRequest.java | 6685 +++++ .../places/v1/SearchTextRequestOrBuilder.java | 506 + .../maps/places/v1/SearchTextResponse.java | 934 + .../v1/SearchTextResponseOrBuilder.java | 76 + .../google/maps/places/v1/geometry.proto | 42 + .../proto/google/maps/places/v1/place.proto | 424 + .../maps/places/v1/places_service.proto | 199 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../places/create/SyncCreateSetEndpoint.java | 40 + .../v1/places/searchtext/AsyncSearchText.java | 63 + .../v1/places/searchtext/SyncSearchText.java | 60 + .../searchtext/SyncSearchText.java | 48 + .../searchtext/SyncSearchText.java | 48 + pom.xml | 1 + versions.txt | 3 + 51 files changed, 38253 insertions(+) create mode 100644 java-maps-places/.OwlBot.yaml create mode 100644 java-maps-places/.repo-metadata.json create mode 100644 java-maps-places/README.md create mode 100644 java-maps-places/google-maps-places-bom/pom.xml create mode 100644 java-maps-places/google-maps-places/pom.xml create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/gapic_metadata.json create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java create mode 100644 java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java create mode 100644 java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java create mode 100644 java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java create mode 100644 java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java create mode 100644 java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java create mode 100644 java-maps-places/grpc-google-maps-places-v1/pom.xml create mode 100644 java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java create mode 100644 java-maps-places/owlbot.py create mode 100644 java-maps-places/pom.xml create mode 100644 java-maps-places/proto-google-maps-places-v1/clirr-ignored-differences.xml create mode 100644 java-maps-places/proto-google-maps-places-v1/pom.xml create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/geometry.proto create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto create mode 100644 java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java create mode 100644 java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java diff --git a/java-maps-places/.OwlBot.yaml b/java-maps-places/.OwlBot.yaml new file mode 100644 index 000000000000..66a8e8214a5f --- /dev/null +++ b/java-maps-places/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 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. + + +deep-remove-regex: +- "/java-maps-places/grpc-google-.*/src" +- "/java-maps-places/proto-google-.*/src" +- "/java-maps-places/google-.*/src" +- "/java-maps-places/samples/snippets/generated" + +deep-preserve-regex: +- "/java-maps-places/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/maps/places/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-maps-places/$1/proto-google-maps-places-$1/src" +- source: "/google/maps/places/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-maps-places/$1/grpc-google-maps-places-$1/src" +- source: "/google/maps/places/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-maps-places/$1/google-maps-places/src" +- source: "/google/maps/places/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-maps-places/$1/samples/snippets/generated" + + +api-name: maps-places \ No newline at end of file diff --git a/java-maps-places/.repo-metadata.json b/java-maps-places/.repo-metadata.json new file mode 100644 index 000000000000..9e7db117441b --- /dev/null +++ b/java-maps-places/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "maps-places", + "name_pretty": "Places API (New)", + "product_documentation": "https://developers.google.com/maps/documentation/places/web-service/", + "api_description": "The Places API allows developers to access a variety of search and\n retrieval endpoints for a Place.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-places/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-maps-places", + "repo_short": "java-maps-places", + "distribution_name": "com.google.maps:google-maps-places", + "api_id": "places.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-maps-places/README.md b/java-maps-places/README.md new file mode 100644 index 000000000000..0c561450d047 --- /dev/null +++ b/java-maps-places/README.md @@ -0,0 +1,226 @@ +# Google Places API (New) Client for Java + +Java idiomatic client for [Places API (New)][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.14.0 + pom + import + + + + + + + com.google.maps + google-maps-places + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.maps + google-maps-places + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.maps:google-maps-places:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.maps" % "google-maps-places" % "0.0.0" +``` + + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Places API (New) APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Places API (New) API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Places API (New) [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Places API (New). +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-maps-places` library. See the [Quickstart](#quickstart) section +to add `google-maps-places` as a dependency in your code. + +## About Places API (New) + + +[Places API (New)][product-docs] The Places API allows developers to access a variety of search and + retrieval endpoints for a Place. + +See the [Places API (New) client library docs][javadocs] to learn how to +use this Places API (New) Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Places API (New) uses gRPC for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://developers.google.com/maps/documentation/places/web-service/ +[javadocs]: https://cloud.google.com/java/docs/reference/google-maps-places/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-maps-places/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.maps/google-maps-places.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.maps/google-maps-places/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/java-maps-places/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-maps-places/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-maps-places/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=places.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-maps-places/google-maps-places-bom/pom.xml b/java-maps-places/google-maps-places-bom/pom.xml new file mode 100644 index 000000000000..35a0b65fce05 --- /dev/null +++ b/java-maps-places/google-maps-places-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.maps + google-maps-places-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.11.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Places API (New) BOM + + BOM for Places API (New) + + + + true + + + + + + com.google.maps + google-maps-places + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-places-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-places-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-maps-places/google-maps-places/pom.xml b/java-maps-places/google-maps-places/pom.xml new file mode 100644 index 000000000000..5ada70ef3993 --- /dev/null +++ b/java-maps-places/google-maps-places/pom.xml @@ -0,0 +1,114 @@ + + + 4.0.0 + com.google.maps + google-maps-places + 0.0.1-SNAPSHOT + jar + Google Places API (New) + Places API (New) The Places API allows developers to access a variety of search and + retrieval endpoints for a Place. + + com.google.maps + google-maps-places-parent + 0.0.1-SNAPSHOT + + + google-maps-places + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.maps.api.grpc + proto-google-maps-places-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.maps.api.grpc + grpc-google-maps-places-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java new file mode 100644 index 000000000000..c706c01255fc --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java @@ -0,0 +1,285 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.places.v1.stub.PlacesStub; +import com.google.maps.places.v1.stub.PlacesStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service definition for the Places API. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PlacesClient placesClient = PlacesClient.create()) {
+ *   SearchTextRequest request =
+ *       SearchTextRequest.newBuilder()
+ *           .setTextQuery("textQuery-1050470501")
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .setLocation(SearchTextRequest.Location.newBuilder().build())
+ *           .setIncludedType("includedType-45971946")
+ *           .setOpenNow(true)
+ *           .setPriceRange(Int32Range.newBuilder().build())
+ *           .setMinRating(-543315926)
+ *           .setMaxResultCount(-1736124056)
+ *           .addAllPriceLevels(new ArrayList())
+ *           .setStrictTypeFiltering(true)
+ *           .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build())
+ *           .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build())
+ *           .build();
+ *   SearchTextResponse response = placesClient.searchText(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PlacesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of PlacesSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PlacesSettings placesSettings =
+ *     PlacesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PlacesClient placesClient = PlacesClient.create(placesSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PlacesSettings placesSettings = PlacesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PlacesClient placesClient = PlacesClient.create(placesSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PlacesSettings placesSettings = PlacesSettings.newHttpJsonBuilder().build();
+ * PlacesClient placesClient = PlacesClient.create(placesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class PlacesClient implements BackgroundResource { + private final PlacesSettings settings; + private final PlacesStub stub; + + /** Constructs an instance of PlacesClient with default settings. */ + public static final PlacesClient create() throws IOException { + return create(PlacesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PlacesClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final PlacesClient create(PlacesSettings settings) throws IOException { + return new PlacesClient(settings); + } + + /** + * Constructs an instance of PlacesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(PlacesSettings). + */ + public static final PlacesClient create(PlacesStub stub) { + return new PlacesClient(stub); + } + + /** + * Constructs an instance of PlacesClient, using the given settings. This is protected so that it + * is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected PlacesClient(PlacesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PlacesStubSettings) settings.getStubSettings()).createStub(); + } + + protected PlacesClient(PlacesStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PlacesSettings getSettings() { + return settings; + } + + public PlacesStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Text query based place search. + * + *

Sample code: + * + *

{@code
+   * // 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.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PlacesClient placesClient = PlacesClient.create()) {
+   *   SearchTextRequest request =
+   *       SearchTextRequest.newBuilder()
+   *           .setTextQuery("textQuery-1050470501")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .setLocation(SearchTextRequest.Location.newBuilder().build())
+   *           .setIncludedType("includedType-45971946")
+   *           .setOpenNow(true)
+   *           .setPriceRange(Int32Range.newBuilder().build())
+   *           .setMinRating(-543315926)
+   *           .setMaxResultCount(-1736124056)
+   *           .addAllPriceLevels(new ArrayList())
+   *           .setStrictTypeFiltering(true)
+   *           .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build())
+   *           .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build())
+   *           .build();
+   *   SearchTextResponse response = placesClient.searchText(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchTextResponse searchText(SearchTextRequest request) { + return searchTextCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Text query based place search. + * + *

Sample code: + * + *

{@code
+   * // 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.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PlacesClient placesClient = PlacesClient.create()) {
+   *   SearchTextRequest request =
+   *       SearchTextRequest.newBuilder()
+   *           .setTextQuery("textQuery-1050470501")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setRegionCode("regionCode-1991004415")
+   *           .setLocation(SearchTextRequest.Location.newBuilder().build())
+   *           .setIncludedType("includedType-45971946")
+   *           .setOpenNow(true)
+   *           .setPriceRange(Int32Range.newBuilder().build())
+   *           .setMinRating(-543315926)
+   *           .setMaxResultCount(-1736124056)
+   *           .addAllPriceLevels(new ArrayList())
+   *           .setStrictTypeFiltering(true)
+   *           .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build())
+   *           .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = placesClient.searchTextCallable().futureCall(request);
+   *   // Do something.
+   *   SearchTextResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable searchTextCallable() { + return stub.searchTextCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java new file mode 100644 index 000000000000..d1a3a95b4415 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java @@ -0,0 +1,203 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.maps.places.v1.stub.PlacesStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlacesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (places.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of searchText to 30 seconds: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PlacesSettings.Builder placesSettingsBuilder = PlacesSettings.newBuilder();
+ * placesSettingsBuilder
+ *     .searchTextSettings()
+ *     .setRetrySettings(
+ *         placesSettingsBuilder
+ *             .searchTextSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PlacesSettings placesSettings = placesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PlacesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to searchText. */ + public UnaryCallSettings searchTextSettings() { + return ((PlacesStubSettings) getStubSettings()).searchTextSettings(); + } + + public static final PlacesSettings create(PlacesStubSettings stub) throws IOException { + return new PlacesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PlacesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PlacesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PlacesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PlacesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PlacesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PlacesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PlacesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlacesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlacesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PlacesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PlacesStubSettings.newBuilder(clientContext)); + } + + protected Builder(PlacesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PlacesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PlacesStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(PlacesStubSettings.newHttpJsonBuilder()); + } + + public PlacesStubSettings.Builder getStubSettingsBuilder() { + return ((PlacesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to searchText. */ + public UnaryCallSettings.Builder searchTextSettings() { + return getStubSettingsBuilder().searchTextSettings(); + } + + @Override + public PlacesSettings build() throws IOException { + return new PlacesSettings(this); + } + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/gapic_metadata.json b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/gapic_metadata.json new file mode 100644 index 000000000000..dc7d6951bb6c --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.maps.places.v1", + "libraryPackage": "com.google.maps.places.v1", + "services": { + "Places": { + "clients": { + "grpc": { + "libraryClient": "PlacesClient", + "rpcs": { + "SearchText": { + "methods": ["searchText", "searchTextCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java new file mode 100644 index 000000000000..fdf2fcbd4add --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 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. + */ + +/** + * A client to Places API (New) + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= PlacesClient ======================= + * + *

Service Description: Service definition for the Places API. + * + *

Sample for PlacesClient: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PlacesClient placesClient = PlacesClient.create()) {
+ *   SearchTextRequest request =
+ *       SearchTextRequest.newBuilder()
+ *           .setTextQuery("textQuery-1050470501")
+ *           .setLanguageCode("languageCode-2092349083")
+ *           .setRegionCode("regionCode-1991004415")
+ *           .setLocation(SearchTextRequest.Location.newBuilder().build())
+ *           .setIncludedType("includedType-45971946")
+ *           .setOpenNow(true)
+ *           .setPriceRange(Int32Range.newBuilder().build())
+ *           .setMinRating(-543315926)
+ *           .setMaxResultCount(-1736124056)
+ *           .addAllPriceLevels(new ArrayList())
+ *           .setStrictTypeFiltering(true)
+ *           .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build())
+ *           .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build())
+ *           .build();
+ *   SearchTextResponse response = placesClient.searchText(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.maps.places.v1; + +import javax.annotation.Generated; diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java new file mode 100644 index 000000000000..375d404f0e41 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Places service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcPlacesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java new file mode 100644 index 000000000000..98eb65c8fd26 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java @@ -0,0 +1,149 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Places service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcPlacesStub extends PlacesStub { + private static final MethodDescriptor + searchTextMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.maps.places.v1.Places/SearchText") + .setRequestMarshaller(ProtoUtils.marshaller(SearchTextRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchTextResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable searchTextCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPlacesStub create(PlacesStubSettings settings) throws IOException { + return new GrpcPlacesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPlacesStub create(ClientContext clientContext) throws IOException { + return new GrpcPlacesStub(PlacesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPlacesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPlacesStub( + PlacesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPlacesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPlacesStub(PlacesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPlacesCallableFactory()); + } + + /** + * Constructs an instance of GrpcPlacesStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcPlacesStub( + PlacesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings searchTextTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchTextMethodDescriptor) + .build(); + + this.searchTextCallable = + callableFactory.createUnaryCallable( + searchTextTransportSettings, settings.searchTextSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable searchTextCallable() { + return searchTextCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java new file mode 100644 index 000000000000..6b5d80278a04 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Places service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonPlacesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java new file mode 100644 index 000000000000..020ec01b771f --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java @@ -0,0 +1,191 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Places service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonPlacesStub extends PlacesStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + searchTextMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.maps.places.v1.Places/SearchText") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/Text:search", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchTextResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable searchTextCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPlacesStub create(PlacesStubSettings settings) throws IOException { + return new HttpJsonPlacesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPlacesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonPlacesStub(PlacesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPlacesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPlacesStub( + PlacesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPlacesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPlacesStub(PlacesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPlacesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPlacesStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonPlacesStub( + PlacesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings searchTextTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchTextMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.searchTextCallable = + callableFactory.createUnaryCallable( + searchTextTransportSettings, settings.searchTextSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(searchTextMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable searchTextCallable() { + return searchTextCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java new file mode 100644 index 000000000000..9a1530939874 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Places service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class PlacesStub implements BackgroundResource { + + public UnaryCallable searchTextCallable() { + throw new UnsupportedOperationException("Not implemented: searchTextCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java new file mode 100644 index 000000000000..49718da965e8 --- /dev/null +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java @@ -0,0 +1,311 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlacesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (places.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of searchText to 30 seconds: + * + *

{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PlacesStubSettings.Builder placesSettingsBuilder = PlacesStubSettings.newBuilder();
+ * placesSettingsBuilder
+ *     .searchTextSettings()
+ *     .setRetrySettings(
+ *         placesSettingsBuilder
+ *             .searchTextSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PlacesStubSettings placesSettings = placesSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class PlacesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final UnaryCallSettings searchTextSettings; + + /** Returns the object with the settings used for calls to searchText. */ + public UnaryCallSettings searchTextSettings() { + return searchTextSettings; + } + + public PlacesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPlacesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPlacesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "places.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "places.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlacesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlacesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlacesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlacesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchTextSettings = settingsBuilder.searchTextSettings().build(); + } + + /** Builder for PlacesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + searchTextSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchTextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchTextSettings); + initDefaults(this); + } + + protected Builder(PlacesStubSettings settings) { + super(settings); + + searchTextSettings = settings.searchTextSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchTextSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .searchTextSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to searchText. */ + public UnaryCallSettings.Builder searchTextSettings() { + return searchTextSettings; + } + + @Override + public PlacesStubSettings build() throws IOException { + return new PlacesStubSettings(this); + } + } +} diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java new file mode 100644 index 000000000000..7c0c055ae115 --- /dev/null +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlaces implements MockGrpcService { + private final MockPlacesImpl serviceImpl; + + public MockPlaces() { + serviceImpl = new MockPlacesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java new file mode 100644 index 000000000000..24b9ec2803c8 --- /dev/null +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.core.BetaApi; +import com.google.maps.places.v1.PlacesGrpc.PlacesImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlacesImpl extends PlacesImplBase { + private List requests; + private Queue responses; + + public MockPlacesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void searchText( + SearchTextRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchTextResponse) { + requests.add(request); + responseObserver.onNext(((SearchTextResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchText, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchTextResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java new file mode 100644 index 000000000000..c50991fdaaff --- /dev/null +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java @@ -0,0 +1,145 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.maps.places.v1.stub.HttpJsonPlacesStub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlacesClientHttpJsonTest { + private static MockHttpService mockService; + private static PlacesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPlacesStub.getMethodDescriptors(), PlacesSettings.getDefaultEndpoint()); + PlacesSettings settings = + PlacesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PlacesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlacesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void searchTextTest() throws Exception { + SearchTextResponse expectedResponse = + SearchTextResponse.newBuilder().addAllPlaces(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + + SearchTextResponse actualResponse = client.searchText(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchTextExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + client.searchText(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java new file mode 100644 index 000000000000..693f6ed518c3 --- /dev/null +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java @@ -0,0 +1,157 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlacesClientTest { + private static MockPlaces mockPlaces; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PlacesClient client; + + @BeforeClass + public static void startStaticServer() { + mockPlaces = new MockPlaces(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockPlaces)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PlacesSettings settings = + PlacesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlacesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchTextTest() throws Exception { + SearchTextResponse expectedResponse = + SearchTextResponse.newBuilder().addAllPlaces(new ArrayList()).build(); + mockPlaces.addResponse(expectedResponse); + + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + + SearchTextResponse actualResponse = client.searchText(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaces.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchTextRequest actualRequest = ((SearchTextRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getTextQuery(), actualRequest.getTextQuery()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode()); + Assert.assertEquals(request.getRankPreference(), actualRequest.getRankPreference()); + Assert.assertEquals(request.getLocation(), actualRequest.getLocation()); + Assert.assertEquals(request.getIncludedType(), actualRequest.getIncludedType()); + Assert.assertEquals(request.getOpenNow(), actualRequest.getOpenNow()); + Assert.assertEquals(request.getPriceRange(), actualRequest.getPriceRange()); + Assert.assertEquals(request.getMinRating(), actualRequest.getMinRating(), 0.0001); + Assert.assertEquals(request.getMaxResultCount(), actualRequest.getMaxResultCount()); + Assert.assertEquals(request.getPriceLevelsList(), actualRequest.getPriceLevelsList()); + Assert.assertEquals(request.getStrictTypeFiltering(), actualRequest.getStrictTypeFiltering()); + Assert.assertEquals(request.getLocationBias(), actualRequest.getLocationBias()); + Assert.assertEquals(request.getLocationRestriction(), actualRequest.getLocationRestriction()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchTextExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaces.addException(exception); + + try { + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + client.searchText(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-maps-places/grpc-google-maps-places-v1/pom.xml b/java-maps-places/grpc-google-maps-places-v1/pom.xml new file mode 100644 index 000000000000..c393662fd934 --- /dev/null +++ b/java-maps-places/grpc-google-maps-places-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.maps.api.grpc + grpc-google-maps-places-v1 + 0.0.1-SNAPSHOT + grpc-google-maps-places-v1 + GRPC library for google-maps-places + + com.google.maps + google-maps-places-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.maps.api.grpc + proto-google-maps-places-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java new file mode 100644 index 000000000000..145c72942bf9 --- /dev/null +++ b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java @@ -0,0 +1,362 @@ +/* + * Copyright 2020 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. + */ +package com.google.maps.places.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service definition for the Places API.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/maps/places/v1/places_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PlacesGrpc { + + private PlacesGrpc() {} + + public static final String SERVICE_NAME = "google.maps.places.v1.Places"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.maps.places.v1.SearchTextRequest, com.google.maps.places.v1.SearchTextResponse> + getSearchTextMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchText", + requestType = com.google.maps.places.v1.SearchTextRequest.class, + responseType = com.google.maps.places.v1.SearchTextResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.maps.places.v1.SearchTextRequest, com.google.maps.places.v1.SearchTextResponse> + getSearchTextMethod() { + io.grpc.MethodDescriptor< + com.google.maps.places.v1.SearchTextRequest, + com.google.maps.places.v1.SearchTextResponse> + getSearchTextMethod; + if ((getSearchTextMethod = PlacesGrpc.getSearchTextMethod) == null) { + synchronized (PlacesGrpc.class) { + if ((getSearchTextMethod = PlacesGrpc.getSearchTextMethod) == null) { + PlacesGrpc.getSearchTextMethod = + getSearchTextMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchText")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.places.v1.SearchTextRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.maps.places.v1.SearchTextResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlacesMethodDescriptorSupplier("SearchText")) + .build(); + } + } + } + return getSearchTextMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PlacesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlacesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesStub(channel, callOptions); + } + }; + return PlacesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PlacesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlacesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesBlockingStub(channel, callOptions); + } + }; + return PlacesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PlacesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlacesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesFutureStub(channel, callOptions); + } + }; + return PlacesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service definition for the Places API.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Text query based place search.
+     * 
+ */ + default void searchText( + com.google.maps.places.v1.SearchTextRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchTextMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Places. + * + *
+   * Service definition for the Places API.
+   * 
+ */ + public abstract static class PlacesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PlacesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Places. + * + *
+   * Service definition for the Places API.
+   * 
+ */ + public static final class PlacesStub extends io.grpc.stub.AbstractAsyncStub { + private PlacesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlacesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesStub(channel, callOptions); + } + + /** + * + * + *
+     * Text query based place search.
+     * 
+ */ + public void searchText( + com.google.maps.places.v1.SearchTextRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchTextMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Places. + * + *
+   * Service definition for the Places API.
+   * 
+ */ + public static final class PlacesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PlacesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlacesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Text query based place search.
+     * 
+ */ + public com.google.maps.places.v1.SearchTextResponse searchText( + com.google.maps.places.v1.SearchTextRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchTextMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Places. + * + *
+   * Service definition for the Places API.
+   * 
+ */ + public static final class PlacesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PlacesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlacesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlacesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Text query based place search.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.maps.places.v1.SearchTextResponse> + searchText(com.google.maps.places.v1.SearchTextRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchTextMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH_TEXT = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SEARCH_TEXT: + serviceImpl.searchText( + (com.google.maps.places.v1.SearchTextRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSearchTextMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.maps.places.v1.SearchTextRequest, + com.google.maps.places.v1.SearchTextResponse>(service, METHODID_SEARCH_TEXT))) + .build(); + } + + private abstract static class PlacesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PlacesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Places"); + } + } + + private static final class PlacesFileDescriptorSupplier extends PlacesBaseDescriptorSupplier { + PlacesFileDescriptorSupplier() {} + } + + private static final class PlacesMethodDescriptorSupplier extends PlacesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PlacesMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PlacesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PlacesFileDescriptorSupplier()) + .addMethod(getSearchTextMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-maps-places/owlbot.py b/java-maps-places/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-maps-places/owlbot.py @@ -0,0 +1,36 @@ +# 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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-maps-places/pom.xml b/java-maps-places/pom.xml new file mode 100644 index 000000000000..e06b213158a6 --- /dev/null +++ b/java-maps-places/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.google.maps + google-maps-places-parent + pom + 0.0.1-SNAPSHOT + Google Places API (New) Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.11.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-maps-places-parent + + + + + + com.google.maps + google-maps-places + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + grpc-google-maps-places-v1 + 0.0.1-SNAPSHOT + + + com.google.maps.api.grpc + proto-google-maps-places-v1 + 0.0.1-SNAPSHOT + + + + + + google-maps-places + grpc-google-maps-places-v1 + proto-google-maps-places-v1 + google-maps-places-bom + + diff --git a/java-maps-places/proto-google-maps-places-v1/clirr-ignored-differences.xml b/java-maps-places/proto-google-maps-places-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..3ef47c163a11 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/maps/places/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/maps/places/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/maps/places/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-maps-places/proto-google-maps-places-v1/pom.xml b/java-maps-places/proto-google-maps-places-v1/pom.xml new file mode 100644 index 000000000000..276dde1f289f --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.maps.api.grpc + proto-google-maps-places-v1 + 0.0.1-SNAPSHOT + proto-google-maps-places-v1 + Proto library for google-maps-places + + com.google.maps + google-maps-places-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java new file mode 100644 index 000000000000..b631438691cd --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java @@ -0,0 +1,816 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/geometry.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * Circle with a LatLng as center and radius.
+ * 
+ * + * Protobuf type {@code google.maps.places.v1.Circle} + */ +public final class Circle extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Circle) + CircleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Circle.newBuilder() to construct. + private Circle(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Circle() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Circle(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.GeometryProto + .internal_static_google_maps_places_v1_Circle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.GeometryProto + .internal_static_google_maps_places_v1_Circle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Circle.class, com.google.maps.places.v1.Circle.Builder.class); + } + + public static final int CENTER_FIELD_NUMBER = 1; + private com.google.type.LatLng center_; + /** + * + * + *
+   * 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]; + * + * @return Whether the center field is set. + */ + @java.lang.Override + public boolean hasCenter() { + return center_ != null; + } + /** + * + * + *
+   * 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]; + * + * @return The center. + */ + @java.lang.Override + public com.google.type.LatLng getCenter() { + return center_ == null ? com.google.type.LatLng.getDefaultInstance() : center_; + } + /** + * + * + *
+   * 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]; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getCenterOrBuilder() { + return center_ == null ? com.google.type.LatLng.getDefaultInstance() : center_; + } + + public static final int RADIUS_FIELD_NUMBER = 2; + private double radius_ = 0D; + /** + * + * + *
+   * Required. Radius measured in meters. The radius must be within `[0.0,
+   * 50000.0]`.
+   * 
+ * + * double radius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The radius. + */ + @java.lang.Override + public double getRadius() { + return radius_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (center_ != null) { + output.writeMessage(1, getCenter()); + } + if (java.lang.Double.doubleToRawLongBits(radius_) != 0) { + output.writeDouble(2, radius_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (center_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCenter()); + } + if (java.lang.Double.doubleToRawLongBits(radius_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, radius_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Circle)) { + return super.equals(obj); + } + com.google.maps.places.v1.Circle other = (com.google.maps.places.v1.Circle) obj; + + if (hasCenter() != other.hasCenter()) return false; + if (hasCenter()) { + if (!getCenter().equals(other.getCenter())) return false; + } + if (java.lang.Double.doubleToLongBits(getRadius()) + != java.lang.Double.doubleToLongBits(other.getRadius())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCenter()) { + hash = (37 * hash) + CENTER_FIELD_NUMBER; + hash = (53 * hash) + getCenter().hashCode(); + } + hash = (37 * hash) + RADIUS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getRadius())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Circle parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Circle parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Circle parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Circle parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Circle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Circle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Circle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Circle parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Circle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Circle parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Circle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Circle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Circle prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Circle with a LatLng as center and radius.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Circle} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Circle) + com.google.maps.places.v1.CircleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.GeometryProto + .internal_static_google_maps_places_v1_Circle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.GeometryProto + .internal_static_google_maps_places_v1_Circle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Circle.class, + com.google.maps.places.v1.Circle.Builder.class); + } + + // Construct using com.google.maps.places.v1.Circle.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + center_ = null; + if (centerBuilder_ != null) { + centerBuilder_.dispose(); + centerBuilder_ = null; + } + radius_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.GeometryProto + .internal_static_google_maps_places_v1_Circle_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Circle getDefaultInstanceForType() { + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Circle build() { + com.google.maps.places.v1.Circle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Circle buildPartial() { + com.google.maps.places.v1.Circle result = new com.google.maps.places.v1.Circle(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Circle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.center_ = centerBuilder_ == null ? center_ : centerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.radius_ = radius_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Circle) { + return mergeFrom((com.google.maps.places.v1.Circle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Circle other) { + if (other == com.google.maps.places.v1.Circle.getDefaultInstance()) return this; + if (other.hasCenter()) { + mergeCenter(other.getCenter()); + } + if (other.getRadius() != 0D) { + setRadius(other.getRadius()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCenterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + radius_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.LatLng center_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + centerBuilder_; + /** + * + * + *
+     * 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]; + * + * @return Whether the center field is set. + */ + public boolean hasCenter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * 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]; + * + * @return The center. + */ + public com.google.type.LatLng getCenter() { + if (centerBuilder_ == null) { + return center_ == null ? com.google.type.LatLng.getDefaultInstance() : center_; + } else { + return centerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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]; + */ + public Builder setCenter(com.google.type.LatLng value) { + if (centerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + center_ = value; + } else { + centerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * 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]; + */ + public Builder setCenter(com.google.type.LatLng.Builder builderForValue) { + if (centerBuilder_ == null) { + center_ = builderForValue.build(); + } else { + centerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * 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]; + */ + public Builder mergeCenter(com.google.type.LatLng value) { + if (centerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && center_ != null + && center_ != com.google.type.LatLng.getDefaultInstance()) { + getCenterBuilder().mergeFrom(value); + } else { + center_ = value; + } + } else { + centerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * 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]; + */ + public Builder clearCenter() { + bitField0_ = (bitField0_ & ~0x00000001); + center_ = null; + if (centerBuilder_ != null) { + centerBuilder_.dispose(); + centerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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]; + */ + public com.google.type.LatLng.Builder getCenterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCenterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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]; + */ + public com.google.type.LatLngOrBuilder getCenterOrBuilder() { + if (centerBuilder_ != null) { + return centerBuilder_.getMessageOrBuilder(); + } else { + return center_ == null ? com.google.type.LatLng.getDefaultInstance() : center_; + } + } + /** + * + * + *
+     * 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]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getCenterFieldBuilder() { + if (centerBuilder_ == null) { + centerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getCenter(), getParentForChildren(), isClean()); + center_ = null; + } + return centerBuilder_; + } + + private double radius_; + /** + * + * + *
+     * Required. Radius measured in meters. The radius must be within `[0.0,
+     * 50000.0]`.
+     * 
+ * + * double radius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The radius. + */ + @java.lang.Override + public double getRadius() { + return radius_; + } + /** + * + * + *
+     * Required. Radius measured in meters. The radius must be within `[0.0,
+     * 50000.0]`.
+     * 
+ * + * double radius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The radius to set. + * @return This builder for chaining. + */ + public Builder setRadius(double value) { + + radius_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Radius measured in meters. The radius must be within `[0.0,
+     * 50000.0]`.
+     * 
+ * + * double radius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRadius() { + bitField0_ = (bitField0_ & ~0x00000002); + radius_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Circle) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Circle) + private static final com.google.maps.places.v1.Circle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Circle(); + } + + public static com.google.maps.places.v1.Circle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Circle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Circle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java new file mode 100644 index 000000000000..e5c7167e30c9 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/geometry.proto + +package com.google.maps.places.v1; + +public interface CircleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Circle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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]; + * + * @return Whether the center field is set. + */ + boolean hasCenter(); + /** + * + * + *
+   * 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]; + * + * @return The center. + */ + com.google.type.LatLng getCenter(); + /** + * + * + *
+   * 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]; + */ + com.google.type.LatLngOrBuilder getCenterOrBuilder(); + + /** + * + * + *
+   * Required. Radius measured in meters. The radius must be within `[0.0,
+   * 50000.0]`.
+   * 
+ * + * double radius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The radius. + */ + double getRadius(); +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java new file mode 100644 index 000000000000..cd3182ae1310 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/geometry.proto + +package com.google.maps.places.v1; + +public final class GeometryProto { + private GeometryProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Circle_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Circle_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n$google/maps/places/v1/geometry.proto\022\025" + + "google.maps.places.v1\032\037google/api/field_" + + "behavior.proto\032\030google/type/latlng.proto" + + "\"G\n\006Circle\022(\n\006center\030\001 \001(\0132\023.google.type" + + ".LatLngB\003\340A\002\022\023\n\006radius\030\002 \001(\001B\003\340A\002B\245\001\n\031co" + + "m.google.maps.places.v1B\rGeometryProtoP\001" + + "Z;google.golang.org/genproto/googleapis/" + + "maps/places/v1;places\370\001\001\242\002\006GMPSV1\252\002\025Goog" + + "le.Maps.Places.V1\312\002\025Google\\Maps\\Places\\V" + + "1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + }); + internal_static_google_maps_places_v1_Circle_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_maps_places_v1_Circle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Circle_descriptor, + new java.lang.String[] { + "Center", "Radius", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java new file mode 100644 index 000000000000..ee1ebb03bb80 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java @@ -0,0 +1,707 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * int 32 range. Both min and max are optional. If only min is set, then the
+ * range only has a lower bound. If only max is set, then range only has an
+ * upper bound. At least one of min and max must be set. Values are inclusive.
+ * 
+ * + * Protobuf type {@code google.maps.places.v1.Int32Range} + */ +public final class Int32Range extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Int32Range) + Int32RangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Int32Range.newBuilder() to construct. + private Int32Range(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Int32Range() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Int32Range(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_Int32Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_Int32Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Int32Range.class, + com.google.maps.places.v1.Int32Range.Builder.class); + } + + private int bitField0_; + public static final int MIN_FIELD_NUMBER = 1; + private int min_ = 0; + /** + * + * + *
+   * Lower bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 min = 1; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Lower bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 min = 1; + * + * @return The min. + */ + @java.lang.Override + public int getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 2; + private int max_ = 0; + /** + * + * + *
+   * Upper bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 max = 2; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Upper bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 max = 2; + * + * @return The max. + */ + @java.lang.Override + public int getMax() { + return max_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, min_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, max_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, min_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, max_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Int32Range)) { + return super.equals(obj); + } + com.google.maps.places.v1.Int32Range other = (com.google.maps.places.v1.Int32Range) obj; + + if (hasMin() != other.hasMin()) return false; + if (hasMin()) { + if (getMin() != other.getMin()) return false; + } + if (hasMax() != other.hasMax()) return false; + if (hasMax()) { + if (getMax() != other.getMax()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMin()) { + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + getMin(); + } + if (hasMax()) { + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Int32Range parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Int32Range parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Int32Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Int32Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Int32Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Int32Range parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Int32Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Int32Range prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * int 32 range. Both min and max are optional. If only min is set, then the
+   * range only has a lower bound. If only max is set, then range only has an
+   * upper bound. At least one of min and max must be set. Values are inclusive.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Int32Range} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Int32Range) + com.google.maps.places.v1.Int32RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_Int32Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_Int32Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Int32Range.class, + com.google.maps.places.v1.Int32Range.Builder.class); + } + + // Construct using com.google.maps.places.v1.Int32Range.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + min_ = 0; + max_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_Int32Range_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Int32Range getDefaultInstanceForType() { + return com.google.maps.places.v1.Int32Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Int32Range build() { + com.google.maps.places.v1.Int32Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Int32Range buildPartial() { + com.google.maps.places.v1.Int32Range result = new com.google.maps.places.v1.Int32Range(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Int32Range result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.min_ = min_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.max_ = max_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Int32Range) { + return mergeFrom((com.google.maps.places.v1.Int32Range) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Int32Range other) { + if (other == com.google.maps.places.v1.Int32Range.getDefaultInstance()) return this; + if (other.hasMin()) { + setMin(other.getMin()); + } + if (other.hasMax()) { + setMax(other.getMax()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + min_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + max_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int min_; + /** + * + * + *
+     * Lower bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 min = 1; + * + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Lower bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 min = 1; + * + * @return The min. + */ + @java.lang.Override + public int getMin() { + return min_; + } + /** + * + * + *
+     * Lower bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 min = 1; + * + * @param value The min to set. + * @return This builder for chaining. + */ + public Builder setMin(int value) { + + min_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Lower bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 min = 1; + * + * @return This builder for chaining. + */ + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000001); + min_ = 0; + onChanged(); + return this; + } + + private int max_; + /** + * + * + *
+     * Upper bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 max = 2; + * + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Upper bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 max = 2; + * + * @return The max. + */ + @java.lang.Override + public int getMax() { + return max_; + } + /** + * + * + *
+     * Upper bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 max = 2; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(int value) { + + max_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Upper bound. If unset, behavior is documented on the range field.
+     * 
+ * + * optional int32 max = 2; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000002); + max_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Int32Range) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Int32Range) + private static final com.google.maps.places.v1.Int32Range DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Int32Range(); + } + + public static com.google.maps.places.v1.Int32Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Int32Range parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Int32Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java new file mode 100644 index 000000000000..2f69ff021669 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +public interface Int32RangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Int32Range) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lower bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 min = 1; + * + * @return Whether the min field is set. + */ + boolean hasMin(); + /** + * + * + *
+   * Lower bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 min = 1; + * + * @return The min. + */ + int getMin(); + + /** + * + * + *
+   * Upper bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 max = 2; + * + * @return Whether the max field is set. + */ + boolean hasMax(); + /** + * + * + *
+   * Upper bound. If unset, behavior is documented on the range field.
+   * 
+ * + * optional int32 max = 2; + * + * @return The max. + */ + int getMax(); +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java new file mode 100644 index 000000000000..0916b196c9e0 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java @@ -0,0 +1,22277 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/place.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * All the information representing a Place.
+ * 
+ * + * Protobuf type {@code google.maps.places.v1.Place} + */ +public final class Place extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place) + PlaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Place.newBuilder() to construct. + private Place(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Place() { + id_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nationalPhoneNumber_ = ""; + internationalPhoneNumber_ = ""; + formattedAddress_ = ""; + addressComponents_ = java.util.Collections.emptyList(); + googleMapsUri_ = ""; + websiteUri_ = ""; + reviews_ = java.util.Collections.emptyList(); + adrFormatAddress_ = ""; + businessStatus_ = 0; + priceLevel_ = 0; + attributions_ = java.util.Collections.emptyList(); + iconMaskBaseUri_ = ""; + iconBackgroundColor_ = ""; + currentSecondaryOpeningHours_ = java.util.Collections.emptyList(); + secondaryOpeningHours_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Place(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.class, com.google.maps.places.v1.Place.Builder.class); + } + + /** + * + * + *
+   * Business status for the place.
+   * 
+ * + * Protobuf enum {@code google.maps.places.v1.Place.BusinessStatus} + */ + public enum BusinessStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * BUSINESS_STATUS_UNSPECIFIED = 0; + */ + BUSINESS_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * The establishment is operational, not necessarily open now.
+     * 
+ * + * OPERATIONAL = 1; + */ + OPERATIONAL(1), + /** + * + * + *
+     * The establishment is temporarily closed.
+     * 
+ * + * CLOSED_TEMPORARILY = 2; + */ + CLOSED_TEMPORARILY(2), + /** + * + * + *
+     * The establishment is permanently closed.
+     * 
+ * + * CLOSED_PERMANENTLY = 3; + */ + CLOSED_PERMANENTLY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * BUSINESS_STATUS_UNSPECIFIED = 0; + */ + public static final int BUSINESS_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The establishment is operational, not necessarily open now.
+     * 
+ * + * OPERATIONAL = 1; + */ + public static final int OPERATIONAL_VALUE = 1; + /** + * + * + *
+     * The establishment is temporarily closed.
+     * 
+ * + * CLOSED_TEMPORARILY = 2; + */ + public static final int CLOSED_TEMPORARILY_VALUE = 2; + /** + * + * + *
+     * The establishment is permanently closed.
+     * 
+ * + * CLOSED_PERMANENTLY = 3; + */ + public static final int CLOSED_PERMANENTLY_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BusinessStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BusinessStatus forNumber(int value) { + switch (value) { + case 0: + return BUSINESS_STATUS_UNSPECIFIED; + case 1: + return OPERATIONAL; + case 2: + return CLOSED_TEMPORARILY; + case 3: + return CLOSED_PERMANENTLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BusinessStatus findValueByNumber(int number) { + return BusinessStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.places.v1.Place.getDescriptor().getEnumTypes().get(0); + } + + private static final BusinessStatus[] VALUES = values(); + + public static BusinessStatus valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BusinessStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.places.v1.Place.BusinessStatus) + } + + public interface AddressComponentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.AddressComponent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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; + * + * @return The longText. + */ + java.lang.String getLongText(); + /** + * + * + *
+     * 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; + * + * @return The bytes for longText. + */ + com.google.protobuf.ByteString getLongTextBytes(); + + /** + * + * + *
+     * 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; + * + * @return The shortText. + */ + java.lang.String getShortText(); + /** + * + * + *
+     * 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; + * + * @return The bytes for shortText. + */ + com.google.protobuf.ByteString getShortTextBytes(); + + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + int getTypesCount(); + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+     * The language used to format this components, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+     * The language used to format this components, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + } + /** + * + * + *
+   * The structured components that form the formatted address, if this
+   * information is available.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.AddressComponent} + */ + public static final class AddressComponent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.AddressComponent) + AddressComponentOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddressComponent.newBuilder() to construct. + private AddressComponent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddressComponent() { + longText_ = ""; + shortText_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddressComponent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_AddressComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_AddressComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.AddressComponent.class, + com.google.maps.places.v1.Place.AddressComponent.Builder.class); + } + + public static final int LONG_TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object longText_ = ""; + /** + * + * + *
+     * 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; + * + * @return The longText. + */ + @java.lang.Override + public java.lang.String getLongText() { + java.lang.Object ref = longText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longText_ = s; + return s; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for longText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLongTextBytes() { + java.lang.Object ref = longText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object shortText_ = ""; + /** + * + * + *
+     * 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; + * + * @return The shortText. + */ + @java.lang.Override + public java.lang.String getShortText() { + java.lang.Object ref = shortText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortText_ = s; + return s; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for shortText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortTextBytes() { + java.lang.Object ref = shortText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList types_; + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * + * + *
+     * An array indicating the type(s) of the address component.
+     * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The language used to format this components, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+     * The language used to format this components, in CLDR notation.
+     * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, longText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, shortText_); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, types_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, longText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, shortText_); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.AddressComponent)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.AddressComponent other = + (com.google.maps.places.v1.Place.AddressComponent) obj; + + if (!getLongText().equals(other.getLongText())) return false; + if (!getShortText().equals(other.getShortText())) return false; + if (!getTypesList().equals(other.getTypesList())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LONG_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getLongText().hashCode(); + hash = (37 * hash) + SHORT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getShortText().hashCode(); + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.AddressComponent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.AddressComponent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The structured components that form the formatted address, if this
+     * information is available.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.AddressComponent} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.AddressComponent) + com.google.maps.places.v1.Place.AddressComponentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_AddressComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_AddressComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.AddressComponent.class, + com.google.maps.places.v1.Place.AddressComponent.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.AddressComponent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + longText_ = ""; + shortText_ = ""; + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_AddressComponent_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponent getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.AddressComponent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponent build() { + com.google.maps.places.v1.Place.AddressComponent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponent buildPartial() { + com.google.maps.places.v1.Place.AddressComponent result = + new com.google.maps.places.v1.Place.AddressComponent(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.maps.places.v1.Place.AddressComponent result) { + if (((bitField0_ & 0x00000004) != 0)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.types_ = types_; + } + + private void buildPartial0(com.google.maps.places.v1.Place.AddressComponent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.longText_ = longText_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortText_ = shortText_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.AddressComponent) { + return mergeFrom((com.google.maps.places.v1.Place.AddressComponent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.AddressComponent other) { + if (other == com.google.maps.places.v1.Place.AddressComponent.getDefaultInstance()) + return this; + if (!other.getLongText().isEmpty()) { + longText_ = other.longText_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getShortText().isEmpty()) { + shortText_ = other.shortText_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + longText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + shortText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object longText_ = ""; + /** + * + * + *
+       * 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; + * + * @return The longText. + */ + public java.lang.String getLongText() { + java.lang.Object ref = longText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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; + * + * @return The bytes for longText. + */ + public com.google.protobuf.ByteString getLongTextBytes() { + java.lang.Object ref = longText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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; + * + * @param value The longText to set. + * @return This builder for chaining. + */ + public Builder setLongText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + longText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearLongText() { + longText_ = getDefaultInstance().getLongText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes for longText to set. + * @return This builder for chaining. + */ + public Builder setLongTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + longText_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object shortText_ = ""; + /** + * + * + *
+       * 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; + * + * @return The shortText. + */ + public java.lang.String getShortText() { + java.lang.Object ref = shortText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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; + * + * @return The bytes for shortText. + */ + public com.google.protobuf.ByteString getShortTextBytes() { + java.lang.Object ref = shortText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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; + * + * @param value The shortText to set. + * @return This builder for chaining. + */ + public Builder setShortText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + shortText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearShortText() { + shortText_ = getDefaultInstance().getShortText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes for shortText to set. + * @return This builder for chaining. + */ + public Builder setShortTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + shortText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList types_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_.getUnmodifiableView(); + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + onChanged(); + return this; + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * An array indicating the type(s) of the address component.
+       * 
+ * + * repeated string types = 3; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+       * The language used to format this components, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The language used to format this components, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The language used to format this components, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The language used to format this components, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The language used to format this components, in CLDR notation.
+       * 
+ * + * string language_code = 4; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.AddressComponent) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.AddressComponent) + private static final com.google.maps.places.v1.Place.AddressComponent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.AddressComponent(); + } + + public static com.google.maps.places.v1.Place.AddressComponent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddressComponent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PlusCodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.PlusCode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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; + * + * @return The globalCode. + */ + java.lang.String getGlobalCode(); + /** + * + * + *
+     * 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; + * + * @return The bytes for globalCode. + */ + com.google.protobuf.ByteString getGlobalCodeBytes(); + + /** + * + * + *
+     * 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; + * + * @return The compoundCode. + */ + java.lang.String getCompoundCode(); + /** + * + * + *
+     * 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; + * + * @return The bytes for compoundCode. + */ + com.google.protobuf.ByteString getCompoundCodeBytes(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.PlusCode} + */ + public static final class PlusCode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.PlusCode) + PlusCodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlusCode.newBuilder() to construct. + private PlusCode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlusCode() { + globalCode_ = ""; + compoundCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlusCode(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_PlusCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_PlusCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.PlusCode.class, + com.google.maps.places.v1.Place.PlusCode.Builder.class); + } + + public static final int GLOBAL_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object globalCode_ = ""; + /** + * + * + *
+     * 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; + * + * @return The globalCode. + */ + @java.lang.Override + public java.lang.String getGlobalCode() { + java.lang.Object ref = globalCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalCode_ = s; + return s; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for globalCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGlobalCodeBytes() { + java.lang.Object ref = globalCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globalCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPOUND_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object compoundCode_ = ""; + /** + * + * + *
+     * 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; + * + * @return The compoundCode. + */ + @java.lang.Override + public java.lang.String getCompoundCode() { + java.lang.Object ref = compoundCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compoundCode_ = s; + return s; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for compoundCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompoundCodeBytes() { + java.lang.Object ref = compoundCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + compoundCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globalCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, globalCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compoundCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, compoundCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globalCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, globalCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(compoundCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, compoundCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.PlusCode)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.PlusCode other = + (com.google.maps.places.v1.Place.PlusCode) obj; + + if (!getGlobalCode().equals(other.getGlobalCode())) return false; + if (!getCompoundCode().equals(other.getCompoundCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GLOBAL_CODE_FIELD_NUMBER; + hash = (53 * hash) + getGlobalCode().hashCode(); + hash = (37 * hash) + COMPOUND_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCompoundCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.PlusCode parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.PlusCode parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.PlusCode parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.PlusCode prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.PlusCode} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.PlusCode) + com.google.maps.places.v1.Place.PlusCodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_PlusCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_PlusCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.PlusCode.class, + com.google.maps.places.v1.Place.PlusCode.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.PlusCode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + globalCode_ = ""; + compoundCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_PlusCode_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCode getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.PlusCode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCode build() { + com.google.maps.places.v1.Place.PlusCode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCode buildPartial() { + com.google.maps.places.v1.Place.PlusCode result = + new com.google.maps.places.v1.Place.PlusCode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Place.PlusCode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.globalCode_ = globalCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.compoundCode_ = compoundCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.PlusCode) { + return mergeFrom((com.google.maps.places.v1.Place.PlusCode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.PlusCode other) { + if (other == com.google.maps.places.v1.Place.PlusCode.getDefaultInstance()) return this; + if (!other.getGlobalCode().isEmpty()) { + globalCode_ = other.globalCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCompoundCode().isEmpty()) { + compoundCode_ = other.compoundCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + globalCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + compoundCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object globalCode_ = ""; + /** + * + * + *
+       * 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; + * + * @return The globalCode. + */ + public java.lang.String getGlobalCode() { + java.lang.Object ref = globalCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globalCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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; + * + * @return The bytes for globalCode. + */ + public com.google.protobuf.ByteString getGlobalCodeBytes() { + java.lang.Object ref = globalCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globalCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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; + * + * @param value The globalCode to set. + * @return This builder for chaining. + */ + public Builder setGlobalCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + globalCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearGlobalCode() { + globalCode_ = getDefaultInstance().getGlobalCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes for globalCode to set. + * @return This builder for chaining. + */ + public Builder setGlobalCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + globalCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object compoundCode_ = ""; + /** + * + * + *
+       * 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; + * + * @return The compoundCode. + */ + public java.lang.String getCompoundCode() { + java.lang.Object ref = compoundCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + compoundCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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; + * + * @return The bytes for compoundCode. + */ + public com.google.protobuf.ByteString getCompoundCodeBytes() { + java.lang.Object ref = compoundCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + compoundCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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; + * + * @param value The compoundCode to set. + * @return This builder for chaining. + */ + public Builder setCompoundCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + compoundCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearCompoundCode() { + compoundCode_ = getDefaultInstance().getCompoundCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes for compoundCode to set. + * @return This builder for chaining. + */ + public Builder setCompoundCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + compoundCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.PlusCode) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.PlusCode) + private static final com.google.maps.places.v1.Place.PlusCode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.PlusCode(); + } + + public static com.google.maps.places.v1.Place.PlusCode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlusCode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ReviewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.Review) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return Whether the publishTime field is set. + */ + boolean hasPublishTime(); + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return The publishTime. + */ + com.google.protobuf.Timestamp getPublishTime(); + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder(); + + /** + * + * + *
+     * 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; + * + * @return The relativePublishTimeDescription. + */ + java.lang.String getRelativePublishTimeDescription(); + /** + * + * + *
+     * 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; + * + * @return The bytes for relativePublishTimeDescription. + */ + com.google.protobuf.ByteString getRelativePublishTimeDescriptionBytes(); + + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return The text. + */ + com.google.type.LocalizedText getText(); + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + */ + com.google.type.LocalizedTextOrBuilder getTextOrBuilder(); + + /** + * + * + *
+     * The name of the review author.
+     * 
+ * + * string author = 4; + * + * @return The author. + */ + java.lang.String getAuthor(); + /** + * + * + *
+     * The name of the review author.
+     * 
+ * + * string author = 4; + * + * @return The bytes for author. + */ + com.google.protobuf.ByteString getAuthorBytes(); + + /** + * + * + *
+     * A link to the review author's profile.
+     * 
+ * + * string author_uri = 5; + * + * @return The authorUri. + */ + java.lang.String getAuthorUri(); + /** + * + * + *
+     * A link to the review author's profile.
+     * 
+ * + * string author_uri = 5; + * + * @return The bytes for authorUri. + */ + com.google.protobuf.ByteString getAuthorUriBytes(); + + /** + * + * + *
+     * The author's profile photo.
+     * 
+ * + * string author_photo_uri = 6; + * + * @return The authorPhotoUri. + */ + java.lang.String getAuthorPhotoUri(); + /** + * + * + *
+     * The author's profile photo.
+     * 
+ * + * string author_photo_uri = 6; + * + * @return The bytes for authorPhotoUri. + */ + com.google.protobuf.ByteString getAuthorPhotoUriBytes(); + + /** + * + * + *
+     * A whole number between 1.0 and 5.0, a.k.a. the number of stars.
+     * 
+ * + * double rating = 7; + * + * @return The rating. + */ + double getRating(); + + /** + * + * + *
+     * A BCP-47 language code indicating the original language of the review.
+     * If the review has been translated, then original_language != language.
+     * This field contains the main language tag only, and not the secondary tag
+     * indicating country or region. For example, all the English reviews are
+     * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+     * if there is only a rating with no review text.
+     * 
+ * + * string original_language_code = 10; + * + * @return The originalLanguageCode. + */ + java.lang.String getOriginalLanguageCode(); + /** + * + * + *
+     * A BCP-47 language code indicating the original language of the review.
+     * If the review has been translated, then original_language != language.
+     * This field contains the main language tag only, and not the secondary tag
+     * indicating country or region. For example, all the English reviews are
+     * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+     * if there is only a rating with no review text.
+     * 
+ * + * string original_language_code = 10; + * + * @return The bytes for originalLanguageCode. + */ + com.google.protobuf.ByteString getOriginalLanguageCodeBytes(); + + /** + * + * + *
+     * A boolean value indicating if the review was translated from the original
+     * language it was written in. If a review has been translated,
+     * corresponding to a value of true, Google recommends that you indicate
+     * this to your users. For example, you can add the following string,
+     * “Translated by Google”, to the review.
+     * 
+ * + * bool translated = 11; + * + * @return The translated. + */ + boolean getTranslated(); + } + /** + * + * + *
+   * Information about a review of the place.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.Review} + */ + public static final class Review extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.Review) + ReviewOrBuilder { + private static final long serialVersionUID = 0L; + // Use Review.newBuilder() to construct. + private Review(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Review() { + relativePublishTimeDescription_ = ""; + author_ = ""; + authorUri_ = ""; + authorPhotoUri_ = ""; + originalLanguageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Review(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Review_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Review_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.Review.class, + com.google.maps.places.v1.Place.Review.Builder.class); + } + + public static final int PUBLISH_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp publishTime_; + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return Whether the publishTime field is set. + */ + @java.lang.Override + public boolean hasPublishTime() { + return publishTime_ != null; + } + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return The publishTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPublishTime() { + return publishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : publishTime_; + } + /** + * + * + *
+     * Timestamp for the review, expressed in seconds since epoch.
+     * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { + return publishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : publishTime_; + } + + public static final int RELATIVE_PUBLISH_TIME_DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object relativePublishTimeDescription_ = ""; + /** + * + * + *
+     * 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; + * + * @return The relativePublishTimeDescription. + */ + @java.lang.Override + public java.lang.String getRelativePublishTimeDescription() { + java.lang.Object ref = relativePublishTimeDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativePublishTimeDescription_ = s; + return s; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for relativePublishTimeDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRelativePublishTimeDescriptionBytes() { + java.lang.Object ref = relativePublishTimeDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativePublishTimeDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 9; + private com.google.type.LocalizedText text_; + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return text_ != null; + } + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return The text. + */ + @java.lang.Override + public com.google.type.LocalizedText getText() { + return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_; + } + /** + * + * + *
+     * The localized text of the review.
+     * 
+ * + * .google.type.LocalizedText text = 9; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getTextOrBuilder() { + return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_; + } + + public static final int AUTHOR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object author_ = ""; + /** + * + * + *
+     * The name of the review author.
+     * 
+ * + * string author = 4; + * + * @return The author. + */ + @java.lang.Override + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the review author.
+     * 
+ * + * string author = 4; + * + * @return The bytes for author. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHOR_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object authorUri_ = ""; + /** + * + * + *
+     * A link to the review author's profile.
+     * 
+ * + * string author_uri = 5; + * + * @return The authorUri. + */ + @java.lang.Override + public java.lang.String getAuthorUri() { + java.lang.Object ref = authorUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorUri_ = s; + return s; + } + } + /** + * + * + *
+     * A link to the review author's profile.
+     * 
+ * + * string author_uri = 5; + * + * @return The bytes for authorUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorUriBytes() { + java.lang.Object ref = authorUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHOR_PHOTO_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object authorPhotoUri_ = ""; + /** + * + * + *
+     * The author's profile photo.
+     * 
+ * + * string author_photo_uri = 6; + * + * @return The authorPhotoUri. + */ + @java.lang.Override + public java.lang.String getAuthorPhotoUri() { + java.lang.Object ref = authorPhotoUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorPhotoUri_ = s; + return s; + } + } + /** + * + * + *
+     * The author's profile photo.
+     * 
+ * + * string author_photo_uri = 6; + * + * @return The bytes for authorPhotoUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorPhotoUriBytes() { + java.lang.Object ref = authorPhotoUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorPhotoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RATING_FIELD_NUMBER = 7; + private double rating_ = 0D; + /** + * + * + *
+     * A whole number between 1.0 and 5.0, a.k.a. the number of stars.
+     * 
+ * + * double rating = 7; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + + public static final int ORIGINAL_LANGUAGE_CODE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object originalLanguageCode_ = ""; + /** + * + * + *
+     * A BCP-47 language code indicating the original language of the review.
+     * If the review has been translated, then original_language != language.
+     * This field contains the main language tag only, and not the secondary tag
+     * indicating country or region. For example, all the English reviews are
+     * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+     * if there is only a rating with no review text.
+     * 
+ * + * string original_language_code = 10; + * + * @return The originalLanguageCode. + */ + @java.lang.Override + public java.lang.String getOriginalLanguageCode() { + java.lang.Object ref = originalLanguageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalLanguageCode_ = s; + return s; + } + } + /** + * + * + *
+     * A BCP-47 language code indicating the original language of the review.
+     * If the review has been translated, then original_language != language.
+     * This field contains the main language tag only, and not the secondary tag
+     * indicating country or region. For example, all the English reviews are
+     * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+     * if there is only a rating with no review text.
+     * 
+ * + * string original_language_code = 10; + * + * @return The bytes for originalLanguageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOriginalLanguageCodeBytes() { + java.lang.Object ref = originalLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSLATED_FIELD_NUMBER = 11; + private boolean translated_ = false; + /** + * + * + *
+     * A boolean value indicating if the review was translated from the original
+     * language it was written in. If a review has been translated,
+     * corresponding to a value of true, Google recommends that you indicate
+     * this to your users. For example, you can add the following string,
+     * “Translated by Google”, to the review.
+     * 
+ * + * bool translated = 11; + * + * @return The translated. + */ + @java.lang.Override + public boolean getTranslated() { + return translated_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (publishTime_ != null) { + output.writeMessage(1, getPublishTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePublishTimeDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, relativePublishTimeDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, author_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, authorUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorPhotoUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorPhotoUri_); + } + if (java.lang.Double.doubleToRawLongBits(rating_) != 0) { + output.writeDouble(7, rating_); + } + if (text_ != null) { + output.writeMessage(9, getText()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalLanguageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, originalLanguageCode_); + } + if (translated_ != false) { + output.writeBool(11, translated_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (publishTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPublishTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePublishTimeDescription_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, relativePublishTimeDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, author_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, authorUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorPhotoUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authorPhotoUri_); + } + if (java.lang.Double.doubleToRawLongBits(rating_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, rating_); + } + if (text_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getText()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(originalLanguageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, originalLanguageCode_); + } + if (translated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, translated_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.Review)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.Review other = (com.google.maps.places.v1.Place.Review) obj; + + if (hasPublishTime() != other.hasPublishTime()) return false; + if (hasPublishTime()) { + if (!getPublishTime().equals(other.getPublishTime())) return false; + } + if (!getRelativePublishTimeDescription().equals(other.getRelativePublishTimeDescription())) + return false; + if (hasText() != other.hasText()) return false; + if (hasText()) { + if (!getText().equals(other.getText())) return false; + } + if (!getAuthor().equals(other.getAuthor())) return false; + if (!getAuthorUri().equals(other.getAuthorUri())) return false; + if (!getAuthorPhotoUri().equals(other.getAuthorPhotoUri())) return false; + if (java.lang.Double.doubleToLongBits(getRating()) + != java.lang.Double.doubleToLongBits(other.getRating())) return false; + if (!getOriginalLanguageCode().equals(other.getOriginalLanguageCode())) return false; + if (getTranslated() != other.getTranslated()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPublishTime()) { + hash = (37 * hash) + PUBLISH_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPublishTime().hashCode(); + } + hash = (37 * hash) + RELATIVE_PUBLISH_TIME_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getRelativePublishTimeDescription().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + hash = (37 * hash) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + hash = (37 * hash) + AUTHOR_URI_FIELD_NUMBER; + hash = (53 * hash) + getAuthorUri().hashCode(); + hash = (37 * hash) + AUTHOR_PHOTO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAuthorPhotoUri().hashCode(); + hash = (37 * hash) + RATING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRating())); + hash = (37 * hash) + ORIGINAL_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getOriginalLanguageCode().hashCode(); + hash = (37 * hash) + TRANSLATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTranslated()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.Review parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Review parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Review parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Review parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Review parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Review parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.Review prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about a review of the place.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.Review} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.Review) + com.google.maps.places.v1.Place.ReviewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Review_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Review_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.Review.class, + com.google.maps.places.v1.Place.Review.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.Review.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + publishTime_ = null; + if (publishTimeBuilder_ != null) { + publishTimeBuilder_.dispose(); + publishTimeBuilder_ = null; + } + relativePublishTimeDescription_ = ""; + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + author_ = ""; + authorUri_ = ""; + authorPhotoUri_ = ""; + rating_ = 0D; + originalLanguageCode_ = ""; + translated_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Review_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Review getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.Review.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Review build() { + com.google.maps.places.v1.Place.Review result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Review buildPartial() { + com.google.maps.places.v1.Place.Review result = + new com.google.maps.places.v1.Place.Review(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Place.Review result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.publishTime_ = + publishTimeBuilder_ == null ? publishTime_ : publishTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.relativePublishTimeDescription_ = relativePublishTimeDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.text_ = textBuilder_ == null ? text_ : textBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.author_ = author_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.authorUri_ = authorUri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.authorPhotoUri_ = authorPhotoUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.rating_ = rating_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.originalLanguageCode_ = originalLanguageCode_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.translated_ = translated_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.Review) { + return mergeFrom((com.google.maps.places.v1.Place.Review) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.Review other) { + if (other == com.google.maps.places.v1.Place.Review.getDefaultInstance()) return this; + if (other.hasPublishTime()) { + mergePublishTime(other.getPublishTime()); + } + if (!other.getRelativePublishTimeDescription().isEmpty()) { + relativePublishTimeDescription_ = other.relativePublishTimeDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasText()) { + mergeText(other.getText()); + } + if (!other.getAuthor().isEmpty()) { + author_ = other.author_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAuthorUri().isEmpty()) { + authorUri_ = other.authorUri_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getAuthorPhotoUri().isEmpty()) { + authorPhotoUri_ = other.authorPhotoUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getRating() != 0D) { + setRating(other.getRating()); + } + if (!other.getOriginalLanguageCode().isEmpty()) { + originalLanguageCode_ = other.originalLanguageCode_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getTranslated() != false) { + setTranslated(other.getTranslated()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + relativePublishTimeDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + author_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + authorUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + authorPhotoUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 57: + { + rating_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 74: + { + input.readMessage(getTextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 74 + case 82: + { + originalLanguageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: + { + translated_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp publishTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + publishTimeBuilder_; + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return Whether the publishTime field is set. + */ + public boolean hasPublishTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + * + * @return The publishTime. + */ + public com.google.protobuf.Timestamp getPublishTime() { + if (publishTimeBuilder_ == null) { + return publishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : publishTime_; + } else { + return publishTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public Builder setPublishTime(com.google.protobuf.Timestamp value) { + if (publishTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publishTime_ = value; + } else { + publishTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (publishTimeBuilder_ == null) { + publishTime_ = builderForValue.build(); + } else { + publishTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public Builder mergePublishTime(com.google.protobuf.Timestamp value) { + if (publishTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && publishTime_ != null + && publishTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPublishTimeBuilder().mergeFrom(value); + } else { + publishTime_ = value; + } + } else { + publishTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public Builder clearPublishTime() { + bitField0_ = (bitField0_ & ~0x00000001); + publishTime_ = null; + if (publishTimeBuilder_ != null) { + publishTimeBuilder_.dispose(); + publishTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPublishTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder() { + if (publishTimeBuilder_ != null) { + return publishTimeBuilder_.getMessageOrBuilder(); + } else { + return publishTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : publishTime_; + } + } + /** + * + * + *
+       * Timestamp for the review, expressed in seconds since epoch.
+       * 
+ * + * .google.protobuf.Timestamp publish_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPublishTimeFieldBuilder() { + if (publishTimeBuilder_ == null) { + publishTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPublishTime(), getParentForChildren(), isClean()); + publishTime_ = null; + } + return publishTimeBuilder_; + } + + private java.lang.Object relativePublishTimeDescription_ = ""; + /** + * + * + *
+       * 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; + * + * @return The relativePublishTimeDescription. + */ + public java.lang.String getRelativePublishTimeDescription() { + java.lang.Object ref = relativePublishTimeDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativePublishTimeDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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; + * + * @return The bytes for relativePublishTimeDescription. + */ + public com.google.protobuf.ByteString getRelativePublishTimeDescriptionBytes() { + java.lang.Object ref = relativePublishTimeDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + relativePublishTimeDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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; + * + * @param value The relativePublishTimeDescription to set. + * @return This builder for chaining. + */ + public Builder setRelativePublishTimeDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + relativePublishTimeDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearRelativePublishTimeDescription() { + relativePublishTimeDescription_ = getDefaultInstance().getRelativePublishTimeDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes for relativePublishTimeDescription to set. + * @return This builder for chaining. + */ + public Builder setRelativePublishTimeDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + relativePublishTimeDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.type.LocalizedText text_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + textBuilder_; + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + * + * @return The text. + */ + public com.google.type.LocalizedText getText() { + if (textBuilder_ == null) { + return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_; + } else { + return textBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public Builder setText(com.google.type.LocalizedText value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + } else { + textBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public Builder setText(com.google.type.LocalizedText.Builder builderForValue) { + if (textBuilder_ == null) { + text_ = builderForValue.build(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public Builder mergeText(com.google.type.LocalizedText value) { + if (textBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && text_ != null + && text_ != com.google.type.LocalizedText.getDefaultInstance()) { + getTextBuilder().mergeFrom(value); + } else { + text_ = value; + } + } else { + textBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000004); + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public com.google.type.LocalizedText.Builder getTextBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTextFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + public com.google.type.LocalizedTextOrBuilder getTextOrBuilder() { + if (textBuilder_ != null) { + return textBuilder_.getMessageOrBuilder(); + } else { + return text_ == null ? com.google.type.LocalizedText.getDefaultInstance() : text_; + } + } + /** + * + * + *
+       * The localized text of the review.
+       * 
+ * + * .google.type.LocalizedText text = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + textBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getText(), getParentForChildren(), isClean()); + text_ = null; + } + return textBuilder_; + } + + private java.lang.Object author_ = ""; + /** + * + * + *
+       * The name of the review author.
+       * 
+ * + * string author = 4; + * + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the review author.
+       * 
+ * + * string author = 4; + * + * @return The bytes for author. + */ + public com.google.protobuf.ByteString getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the review author.
+       * 
+ * + * string author = 4; + * + * @param value The author to set. + * @return This builder for chaining. + */ + public Builder setAuthor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + author_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the review author.
+       * 
+ * + * string author = 4; + * + * @return This builder for chaining. + */ + public Builder clearAuthor() { + author_ = getDefaultInstance().getAuthor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the review author.
+       * 
+ * + * string author = 4; + * + * @param value The bytes for author to set. + * @return This builder for chaining. + */ + public Builder setAuthorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + author_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object authorUri_ = ""; + /** + * + * + *
+       * A link to the review author's profile.
+       * 
+ * + * string author_uri = 5; + * + * @return The authorUri. + */ + public java.lang.String getAuthorUri() { + java.lang.Object ref = authorUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A link to the review author's profile.
+       * 
+ * + * string author_uri = 5; + * + * @return The bytes for authorUri. + */ + public com.google.protobuf.ByteString getAuthorUriBytes() { + java.lang.Object ref = authorUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A link to the review author's profile.
+       * 
+ * + * string author_uri = 5; + * + * @param value The authorUri to set. + * @return This builder for chaining. + */ + public Builder setAuthorUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authorUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * A link to the review author's profile.
+       * 
+ * + * string author_uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearAuthorUri() { + authorUri_ = getDefaultInstance().getAuthorUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * A link to the review author's profile.
+       * 
+ * + * string author_uri = 5; + * + * @param value The bytes for authorUri to set. + * @return This builder for chaining. + */ + public Builder setAuthorUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authorUri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object authorPhotoUri_ = ""; + /** + * + * + *
+       * The author's profile photo.
+       * 
+ * + * string author_photo_uri = 6; + * + * @return The authorPhotoUri. + */ + public java.lang.String getAuthorPhotoUri() { + java.lang.Object ref = authorPhotoUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorPhotoUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The author's profile photo.
+       * 
+ * + * string author_photo_uri = 6; + * + * @return The bytes for authorPhotoUri. + */ + public com.google.protobuf.ByteString getAuthorPhotoUriBytes() { + java.lang.Object ref = authorPhotoUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorPhotoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The author's profile photo.
+       * 
+ * + * string author_photo_uri = 6; + * + * @param value The authorPhotoUri to set. + * @return This builder for chaining. + */ + public Builder setAuthorPhotoUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authorPhotoUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The author's profile photo.
+       * 
+ * + * string author_photo_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearAuthorPhotoUri() { + authorPhotoUri_ = getDefaultInstance().getAuthorPhotoUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+       * The author's profile photo.
+       * 
+ * + * string author_photo_uri = 6; + * + * @param value The bytes for authorPhotoUri to set. + * @return This builder for chaining. + */ + public Builder setAuthorPhotoUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authorPhotoUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private double rating_; + /** + * + * + *
+       * A whole number between 1.0 and 5.0, a.k.a. the number of stars.
+       * 
+ * + * double rating = 7; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + /** + * + * + *
+       * A whole number between 1.0 and 5.0, a.k.a. the number of stars.
+       * 
+ * + * double rating = 7; + * + * @param value The rating to set. + * @return This builder for chaining. + */ + public Builder setRating(double value) { + + rating_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * A whole number between 1.0 and 5.0, a.k.a. the number of stars.
+       * 
+ * + * double rating = 7; + * + * @return This builder for chaining. + */ + public Builder clearRating() { + bitField0_ = (bitField0_ & ~0x00000040); + rating_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object originalLanguageCode_ = ""; + /** + * + * + *
+       * A BCP-47 language code indicating the original language of the review.
+       * If the review has been translated, then original_language != language.
+       * This field contains the main language tag only, and not the secondary tag
+       * indicating country or region. For example, all the English reviews are
+       * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+       * if there is only a rating with no review text.
+       * 
+ * + * string original_language_code = 10; + * + * @return The originalLanguageCode. + */ + public java.lang.String getOriginalLanguageCode() { + java.lang.Object ref = originalLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + originalLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A BCP-47 language code indicating the original language of the review.
+       * If the review has been translated, then original_language != language.
+       * This field contains the main language tag only, and not the secondary tag
+       * indicating country or region. For example, all the English reviews are
+       * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+       * if there is only a rating with no review text.
+       * 
+ * + * string original_language_code = 10; + * + * @return The bytes for originalLanguageCode. + */ + public com.google.protobuf.ByteString getOriginalLanguageCodeBytes() { + java.lang.Object ref = originalLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + originalLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A BCP-47 language code indicating the original language of the review.
+       * If the review has been translated, then original_language != language.
+       * This field contains the main language tag only, and not the secondary tag
+       * indicating country or region. For example, all the English reviews are
+       * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+       * if there is only a rating with no review text.
+       * 
+ * + * string original_language_code = 10; + * + * @param value The originalLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setOriginalLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + originalLanguageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * A BCP-47 language code indicating the original language of the review.
+       * If the review has been translated, then original_language != language.
+       * This field contains the main language tag only, and not the secondary tag
+       * indicating country or region. For example, all the English reviews are
+       * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+       * if there is only a rating with no review text.
+       * 
+ * + * string original_language_code = 10; + * + * @return This builder for chaining. + */ + public Builder clearOriginalLanguageCode() { + originalLanguageCode_ = getDefaultInstance().getOriginalLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+       * A BCP-47 language code indicating the original language of the review.
+       * If the review has been translated, then original_language != language.
+       * This field contains the main language tag only, and not the secondary tag
+       * indicating country or region. For example, all the English reviews are
+       * tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty
+       * if there is only a rating with no review text.
+       * 
+ * + * string original_language_code = 10; + * + * @param value The bytes for originalLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setOriginalLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + originalLanguageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean translated_; + /** + * + * + *
+       * A boolean value indicating if the review was translated from the original
+       * language it was written in. If a review has been translated,
+       * corresponding to a value of true, Google recommends that you indicate
+       * this to your users. For example, you can add the following string,
+       * “Translated by Google”, to the review.
+       * 
+ * + * bool translated = 11; + * + * @return The translated. + */ + @java.lang.Override + public boolean getTranslated() { + return translated_; + } + /** + * + * + *
+       * A boolean value indicating if the review was translated from the original
+       * language it was written in. If a review has been translated,
+       * corresponding to a value of true, Google recommends that you indicate
+       * this to your users. For example, you can add the following string,
+       * “Translated by Google”, to the review.
+       * 
+ * + * bool translated = 11; + * + * @param value The translated to set. + * @return This builder for chaining. + */ + public Builder setTranslated(boolean value) { + + translated_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * A boolean value indicating if the review was translated from the original
+       * language it was written in. If a review has been translated,
+       * corresponding to a value of true, Google recommends that you indicate
+       * this to your users. For example, you can add the following string,
+       * “Translated by Google”, to the review.
+       * 
+ * + * bool translated = 11; + * + * @return This builder for chaining. + */ + public Builder clearTranslated() { + bitField0_ = (bitField0_ & ~0x00000100); + translated_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.Review) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.Review) + private static final com.google.maps.places.v1.Place.Review DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.Review(); + } + + public static com.google.maps.places.v1.Place.Review getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Review parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Review getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OpeningHoursOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.OpeningHours) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Is this place open right now?  Always present unless we lack time-of-day
+     * or timezone data for these opening hours.
+     * 
+ * + * bool open_now = 1; + * + * @return The openNow. + */ + boolean getOpenNow(); + + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + java.util.List + getPeriodsList(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod getPeriods(int index); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + int getPeriodsCount(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + java.util.List< + ? extends com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder> + getPeriodsOrBuilderList(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder getPeriodsOrBuilder( + int index); + + /** + * + * + *
+     * 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; + * + * @return A list containing the weekdayDescriptions. + */ + java.util.List getWeekdayDescriptionsList(); + /** + * + * + *
+     * 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; + * + * @return The count of weekdayDescriptions. + */ + int getWeekdayDescriptionsCount(); + /** + * + * + *
+     * 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; + * + * @param index The index of the element to return. + * @return The weekdayDescriptions at the given index. + */ + java.lang.String getWeekdayDescriptions(int index); + /** + * + * + *
+     * 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; + * + * @param index The index of the value to return. + * @return The bytes of the weekdayDescriptions at the given index. + */ + com.google.protobuf.ByteString getWeekdayDescriptionsBytes(int index); + + /** + * + * + *
+     * A type string used to identify the type of secondary hours.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The enum numeric value on the wire for secondaryHourType. + */ + int getSecondaryHourTypeValue(); + /** + * + * + *
+     * A type string used to identify the type of secondary hours.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The secondaryHourType. + */ + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType getSecondaryHourType(); + + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + java.util.List getSpecialDaysList(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + com.google.maps.places.v1.Place.OpeningHours.SpecialDay getSpecialDays(int index); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + int getSpecialDaysCount(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + java.util.List + getSpecialDaysOrBuilderList(); + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder getSpecialDaysOrBuilder( + int index); + } + /** + * + * + *
+   * Information about business hour of the place.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours} + */ + public static final class OpeningHours extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.OpeningHours) + OpeningHoursOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpeningHours.newBuilder() to construct. + private OpeningHours(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpeningHours() { + periods_ = java.util.Collections.emptyList(); + weekdayDescriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + secondaryHourType_ = 0; + specialDays_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpeningHours(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.class, + com.google.maps.places.v1.Place.OpeningHours.Builder.class); + } + + /** + * + * + *
+     * A type used to identify the type of secondary hours.
+     * 
+ * + * Protobuf enum {@code google.maps.places.v1.Place.OpeningHours.SecondaryHourType} + */ + public enum SecondaryHourType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value when secondary hour type is not specified.
+       * 
+ * + * SECONDARY_HOUR_TYPE_UNSPECIFIED = 0; + */ + SECONDARY_HOUR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * The drive-through hour for banks, restaurants, or pharmacies.
+       * 
+ * + * DRIVE_THROUGH = 1; + */ + DRIVE_THROUGH(1), + /** + * + * + *
+       * The happy hour.
+       * 
+ * + * HAPPY_HOUR = 2; + */ + HAPPY_HOUR(2), + /** + * + * + *
+       * The delivery hour.
+       * 
+ * + * DELIVERY = 3; + */ + DELIVERY(3), + /** + * + * + *
+       * The takeout hour.
+       * 
+ * + * TAKEOUT = 4; + */ + TAKEOUT(4), + /** + * + * + *
+       * The kitchen hour.
+       * 
+ * + * KITCHEN = 5; + */ + KITCHEN(5), + /** + * + * + *
+       * The breakfast hour.
+       * 
+ * + * BREAKFAST = 6; + */ + BREAKFAST(6), + /** + * + * + *
+       * The lunch hour.
+       * 
+ * + * LUNCH = 7; + */ + LUNCH(7), + /** + * + * + *
+       * The dinner hour.
+       * 
+ * + * DINNER = 8; + */ + DINNER(8), + /** + * + * + *
+       * The brunch hour.
+       * 
+ * + * BRUNCH = 9; + */ + BRUNCH(9), + /** + * + * + *
+       * The pickup hour.
+       * 
+ * + * PICKUP = 10; + */ + PICKUP(10), + /** + * + * + *
+       * The access hours for storage places.
+       * 
+ * + * ACCESS = 11; + */ + ACCESS(11), + /** + * + * + *
+       * The special hours for seniors.
+       * 
+ * + * SENIOR_HOURS = 12; + */ + SENIOR_HOURS(12), + /** + * + * + *
+       * The online service hours.
+       * 
+ * + * ONLINE_SERVICE_HOURS = 13; + */ + ONLINE_SERVICE_HOURS(13), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value when secondary hour type is not specified.
+       * 
+ * + * SECONDARY_HOUR_TYPE_UNSPECIFIED = 0; + */ + public static final int SECONDARY_HOUR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The drive-through hour for banks, restaurants, or pharmacies.
+       * 
+ * + * DRIVE_THROUGH = 1; + */ + public static final int DRIVE_THROUGH_VALUE = 1; + /** + * + * + *
+       * The happy hour.
+       * 
+ * + * HAPPY_HOUR = 2; + */ + public static final int HAPPY_HOUR_VALUE = 2; + /** + * + * + *
+       * The delivery hour.
+       * 
+ * + * DELIVERY = 3; + */ + public static final int DELIVERY_VALUE = 3; + /** + * + * + *
+       * The takeout hour.
+       * 
+ * + * TAKEOUT = 4; + */ + public static final int TAKEOUT_VALUE = 4; + /** + * + * + *
+       * The kitchen hour.
+       * 
+ * + * KITCHEN = 5; + */ + public static final int KITCHEN_VALUE = 5; + /** + * + * + *
+       * The breakfast hour.
+       * 
+ * + * BREAKFAST = 6; + */ + public static final int BREAKFAST_VALUE = 6; + /** + * + * + *
+       * The lunch hour.
+       * 
+ * + * LUNCH = 7; + */ + public static final int LUNCH_VALUE = 7; + /** + * + * + *
+       * The dinner hour.
+       * 
+ * + * DINNER = 8; + */ + public static final int DINNER_VALUE = 8; + /** + * + * + *
+       * The brunch hour.
+       * 
+ * + * BRUNCH = 9; + */ + public static final int BRUNCH_VALUE = 9; + /** + * + * + *
+       * The pickup hour.
+       * 
+ * + * PICKUP = 10; + */ + public static final int PICKUP_VALUE = 10; + /** + * + * + *
+       * The access hours for storage places.
+       * 
+ * + * ACCESS = 11; + */ + public static final int ACCESS_VALUE = 11; + /** + * + * + *
+       * The special hours for seniors.
+       * 
+ * + * SENIOR_HOURS = 12; + */ + public static final int SENIOR_HOURS_VALUE = 12; + /** + * + * + *
+       * The online service hours.
+       * 
+ * + * ONLINE_SERVICE_HOURS = 13; + */ + public static final int ONLINE_SERVICE_HOURS_VALUE = 13; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SecondaryHourType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SecondaryHourType forNumber(int value) { + switch (value) { + case 0: + return SECONDARY_HOUR_TYPE_UNSPECIFIED; + case 1: + return DRIVE_THROUGH; + case 2: + return HAPPY_HOUR; + case 3: + return DELIVERY; + case 4: + return TAKEOUT; + case 5: + return KITCHEN; + case 6: + return BREAKFAST; + case 7: + return LUNCH; + case 8: + return DINNER; + case 9: + return BRUNCH; + case 10: + return PICKUP; + case 11: + return ACCESS; + case 12: + return SENIOR_HOURS; + case 13: + return ONLINE_SERVICE_HOURS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SecondaryHourType findValueByNumber(int number) { + return SecondaryHourType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.places.v1.Place.OpeningHours.getDescriptor().getEnumTypes().get(0); + } + + private static final SecondaryHourType[] VALUES = values(); + + public static SecondaryHourType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SecondaryHourType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.places.v1.Place.OpeningHours.SecondaryHourType) + } + + public interface OpeningHoursPeriodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return Whether the open field is set. + */ + boolean hasOpen(); + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return The open. + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint getOpen(); + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPointOrBuilder + getOpenOrBuilder(); + + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return Whether the close field is set. + */ + boolean hasClose(); + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return The close. + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint getClose(); + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPointOrBuilder + getCloseOrBuilder(); + } + /** + * + * + *
+     * A period the place remains in open_now status.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} + */ + public static final class OpeningHoursPeriod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + OpeningHoursPeriodOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpeningHoursPeriod.newBuilder() to construct. + private OpeningHoursPeriod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpeningHoursPeriod() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpeningHoursPeriod(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.class, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder.class); + } + + public interface OpeningHoursPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+         * Monday, etc.
+         * 
+ * + * optional int32 day = 1; + * + * @return Whether the day field is set. + */ + boolean hasDay(); + /** + * + * + *
+         * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+         * Monday, etc.
+         * 
+ * + * optional int32 day = 1; + * + * @return The day. + */ + int getDay(); + + /** + * + * + *
+         * The hour in 2 digits. Ranges from 00 to 23.
+         * 
+ * + * optional int32 hour = 2; + * + * @return Whether the hour field is set. + */ + boolean hasHour(); + /** + * + * + *
+         * The hour in 2 digits. Ranges from 00 to 23.
+         * 
+ * + * optional int32 hour = 2; + * + * @return The hour. + */ + int getHour(); + + /** + * + * + *
+         * The minute in 2 digits. Ranges from 00 to 59.
+         * 
+ * + * optional int32 minute = 3; + * + * @return Whether the minute field is set. + */ + boolean hasMinute(); + /** + * + * + *
+         * The minute in 2 digits. Ranges from 00 to 59.
+         * 
+ * + * optional int32 minute = 3; + * + * @return The minute. + */ + int getMinute(); + + /** + * + * + *
+         * Date of the endpoint expressed in `RFC3339` format in the local
+         * timezone for the place. For example 2010-12-31.
+         * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The dateDeprecated. + */ + @java.lang.Deprecated + java.lang.String getDateDeprecated(); + /** + * + * + *
+         * Date of the endpoint expressed in `RFC3339` format in the local
+         * timezone for the place. For example 2010-12-31.
+         * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The bytes for dateDeprecated. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getDateDeprecatedBytes(); + + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + * + * @return The date. + */ + com.google.type.Date getDate(); + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+         * 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; + * + * @return The truncated. + */ + boolean getTruncated(); + } + /** + * + * + *
+       * Status changing points.
+       * 
+ * + * Protobuf type {@code + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} + */ + public static final class OpeningHoursPoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + OpeningHoursPointOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpeningHoursPoint.newBuilder() to construct. + private OpeningHoursPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpeningHoursPoint() { + dateDeprecated_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpeningHoursPoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .class, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder.class); + } + + private int bitField0_; + public static final int DAY_FIELD_NUMBER = 1; + private int day_ = 0; + /** + * + * + *
+         * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+         * Monday, etc.
+         * 
+ * + * optional int32 day = 1; + * + * @return Whether the day field is set. + */ + @java.lang.Override + public boolean hasDay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+         * Monday, etc.
+         * 
+ * + * optional int32 day = 1; + * + * @return The day. + */ + @java.lang.Override + public int getDay() { + return day_; + } + + public static final int HOUR_FIELD_NUMBER = 2; + private int hour_ = 0; + /** + * + * + *
+         * The hour in 2 digits. Ranges from 00 to 23.
+         * 
+ * + * optional int32 hour = 2; + * + * @return Whether the hour field is set. + */ + @java.lang.Override + public boolean hasHour() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * The hour in 2 digits. Ranges from 00 to 23.
+         * 
+ * + * optional int32 hour = 2; + * + * @return The hour. + */ + @java.lang.Override + public int getHour() { + return hour_; + } + + public static final int MINUTE_FIELD_NUMBER = 3; + private int minute_ = 0; + /** + * + * + *
+         * The minute in 2 digits. Ranges from 00 to 59.
+         * 
+ * + * optional int32 minute = 3; + * + * @return Whether the minute field is set. + */ + @java.lang.Override + public boolean hasMinute() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+         * The minute in 2 digits. Ranges from 00 to 59.
+         * 
+ * + * optional int32 minute = 3; + * + * @return The minute. + */ + @java.lang.Override + public int getMinute() { + return minute_; + } + + public static final int DATE_DEPRECATED_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object dateDeprecated_ = ""; + /** + * + * + *
+         * Date of the endpoint expressed in `RFC3339` format in the local
+         * timezone for the place. For example 2010-12-31.
+         * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The dateDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getDateDeprecated() { + java.lang.Object ref = dateDeprecated_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dateDeprecated_ = s; + return s; + } + } + /** + * + * + *
+         * Date of the endpoint expressed in `RFC3339` format in the local
+         * timezone for the place. For example 2010-12-31.
+         * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The bytes for dateDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getDateDeprecatedBytes() { + java.lang.Object ref = dateDeprecated_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dateDeprecated_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATE_FIELD_NUMBER = 6; + private com.google.type.Date date_; + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return date_ != null; + } + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + /** + * + * + *
+         * Date in the local timezone for the place.
+         * 
+ * + * .google.type.Date date = 6; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int TRUNCATED_FIELD_NUMBER = 5; + private boolean truncated_ = false; + /** + * + * + *
+         * 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; + * + * @return The truncated. + */ + @java.lang.Override + public boolean getTruncated() { + return truncated_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, day_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, hour_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(3, minute_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dateDeprecated_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dateDeprecated_); + } + if (truncated_ != false) { + output.writeBool(5, truncated_); + } + if (date_ != null) { + output.writeMessage(6, getDate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, day_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, hour_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, minute_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dateDeprecated_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dateDeprecated_); + } + if (truncated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, truncated_); + } + if (date_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint other = + (com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + obj; + + if (hasDay() != other.hasDay()) return false; + if (hasDay()) { + if (getDay() != other.getDay()) return false; + } + if (hasHour() != other.hasHour()) return false; + if (hasHour()) { + if (getHour() != other.getHour()) return false; + } + if (hasMinute() != other.hasMinute()) return false; + if (hasMinute()) { + if (getMinute() != other.getMinute()) return false; + } + if (!getDateDeprecated().equals(other.getDateDeprecated())) return false; + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (getTruncated() != other.getTruncated()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDay()) { + hash = (37 * hash) + DAY_FIELD_NUMBER; + hash = (53 * hash) + getDay(); + } + if (hasHour()) { + hash = (37 * hash) + HOUR_FIELD_NUMBER; + hash = (53 * hash) + getHour(); + } + if (hasMinute()) { + hash = (37 * hash) + MINUTE_FIELD_NUMBER; + hash = (53 * hash) + getMinute(); + } + hash = (37 * hash) + DATE_DEPRECATED_FIELD_NUMBER; + hash = (53 * hash) + getDateDeprecated().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + TRUNCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTruncated()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Status changing points.
+         * 
+ * + * Protobuf type {@code + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.class, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.Builder.class); + } + + // Construct using + // com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + day_ = 0; + hour_ = 0; + minute_ = 0; + dateDeprecated_ = ""; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + truncated_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + build() { + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + buildPartial() { + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + result = + new com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.day_ = day_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hour_ = hour_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.minute_ = minute_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dateDeprecated_ = dateDeprecated_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.truncated_ = truncated_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) { + return mergeFrom( + (com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + other) { + if (other + == com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance()) return this; + if (other.hasDay()) { + setDay(other.getDay()); + } + if (other.hasHour()) { + setHour(other.getHour()); + } + if (other.hasMinute()) { + setMinute(other.getMinute()); + } + if (!other.getDateDeprecated().isEmpty()) { + dateDeprecated_ = other.dateDeprecated_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.getTruncated() != false) { + setTruncated(other.getTruncated()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + day_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + hour_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + minute_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + dateDeprecated_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + truncated_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + input.readMessage(getDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int day_; + /** + * + * + *
+           * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+           * Monday, etc.
+           * 
+ * + * optional int32 day = 1; + * + * @return Whether the day field is set. + */ + @java.lang.Override + public boolean hasDay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+           * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+           * Monday, etc.
+           * 
+ * + * optional int32 day = 1; + * + * @return The day. + */ + @java.lang.Override + public int getDay() { + return day_; + } + /** + * + * + *
+           * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+           * Monday, etc.
+           * 
+ * + * optional int32 day = 1; + * + * @param value The day to set. + * @return This builder for chaining. + */ + public Builder setDay(int value) { + + day_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+           * A day of the week, as an integer in the range 0-6.  0 is Sunday, 1 is
+           * Monday, etc.
+           * 
+ * + * optional int32 day = 1; + * + * @return This builder for chaining. + */ + public Builder clearDay() { + bitField0_ = (bitField0_ & ~0x00000001); + day_ = 0; + onChanged(); + return this; + } + + private int hour_; + /** + * + * + *
+           * The hour in 2 digits. Ranges from 00 to 23.
+           * 
+ * + * optional int32 hour = 2; + * + * @return Whether the hour field is set. + */ + @java.lang.Override + public boolean hasHour() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+           * The hour in 2 digits. Ranges from 00 to 23.
+           * 
+ * + * optional int32 hour = 2; + * + * @return The hour. + */ + @java.lang.Override + public int getHour() { + return hour_; + } + /** + * + * + *
+           * The hour in 2 digits. Ranges from 00 to 23.
+           * 
+ * + * optional int32 hour = 2; + * + * @param value The hour to set. + * @return This builder for chaining. + */ + public Builder setHour(int value) { + + hour_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+           * The hour in 2 digits. Ranges from 00 to 23.
+           * 
+ * + * optional int32 hour = 2; + * + * @return This builder for chaining. + */ + public Builder clearHour() { + bitField0_ = (bitField0_ & ~0x00000002); + hour_ = 0; + onChanged(); + return this; + } + + private int minute_; + /** + * + * + *
+           * The minute in 2 digits. Ranges from 00 to 59.
+           * 
+ * + * optional int32 minute = 3; + * + * @return Whether the minute field is set. + */ + @java.lang.Override + public boolean hasMinute() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+           * The minute in 2 digits. Ranges from 00 to 59.
+           * 
+ * + * optional int32 minute = 3; + * + * @return The minute. + */ + @java.lang.Override + public int getMinute() { + return minute_; + } + /** + * + * + *
+           * The minute in 2 digits. Ranges from 00 to 59.
+           * 
+ * + * optional int32 minute = 3; + * + * @param value The minute to set. + * @return This builder for chaining. + */ + public Builder setMinute(int value) { + + minute_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+           * The minute in 2 digits. Ranges from 00 to 59.
+           * 
+ * + * optional int32 minute = 3; + * + * @return This builder for chaining. + */ + public Builder clearMinute() { + bitField0_ = (bitField0_ & ~0x00000004); + minute_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dateDeprecated_ = ""; + /** + * + * + *
+           * Date of the endpoint expressed in `RFC3339` format in the local
+           * timezone for the place. For example 2010-12-31.
+           * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The dateDeprecated. + */ + @java.lang.Deprecated + public java.lang.String getDateDeprecated() { + java.lang.Object ref = dateDeprecated_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dateDeprecated_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Date of the endpoint expressed in `RFC3339` format in the local
+           * timezone for the place. For example 2010-12-31.
+           * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return The bytes for dateDeprecated. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getDateDeprecatedBytes() { + java.lang.Object ref = dateDeprecated_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dateDeprecated_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Date of the endpoint expressed in `RFC3339` format in the local
+           * timezone for the place. For example 2010-12-31.
+           * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @param value The dateDeprecated to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDateDeprecated(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dateDeprecated_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+           * Date of the endpoint expressed in `RFC3339` format in the local
+           * timezone for the place. For example 2010-12-31.
+           * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearDateDeprecated() { + dateDeprecated_ = getDefaultInstance().getDateDeprecated(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+           * Date of the endpoint expressed in `RFC3339` format in the local
+           * timezone for the place. For example 2010-12-31.
+           * 
+ * + * string date_deprecated = 4 [deprecated = true]; + * + * @deprecated + * google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date_deprecated + * is deprecated. See google/maps/places/v1/place.proto;l=128 + * @param value The bytes for dateDeprecated to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDateDeprecatedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dateDeprecated_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000010); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + /** + * + * + *
+           * Date in the local timezone for the place.
+           * 
+ * + * .google.type.Date date = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>(getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private boolean truncated_; + /** + * + * + *
+           * 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; + * + * @return The truncated. + */ + @java.lang.Override + public boolean getTruncated() { + return truncated_; + } + /** + * + * + *
+           * 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; + * + * @param value The truncated to set. + * @return This builder for chaining. + */ + public Builder setTruncated(boolean value) { + + truncated_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+           * 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; + * + * @return This builder for chaining. + */ + public Builder clearTruncated() { + bitField0_ = (bitField0_ & ~0x00000020); + truncated_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + private static final com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint(); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpeningHoursPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int OPEN_FIELD_NUMBER = 1; + private com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + open_; + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return Whether the open field is set. + */ + @java.lang.Override + public boolean hasOpen() { + return open_ != null; + } + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return The open. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getOpen() { + return open_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : open_; + } + /** + * + * + *
+       * The time that the place starts to be open.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder + getOpenOrBuilder() { + return open_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : open_; + } + + public static final int CLOSE_FIELD_NUMBER = 2; + private com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + close_; + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return Whether the close field is set. + */ + @java.lang.Override + public boolean hasClose() { + return close_ != null; + } + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return The close. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getClose() { + return close_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : close_; + } + /** + * + * + *
+       * The time that the place starts to be closed.
+       * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder + getCloseOrBuilder() { + return close_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : close_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (open_ != null) { + output.writeMessage(1, getOpen()); + } + if (close_ != null) { + output.writeMessage(2, getClose()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (open_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpen()); + } + if (close_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClose()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod other = + (com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) obj; + + if (hasOpen() != other.hasOpen()) return false; + if (hasOpen()) { + if (!getOpen().equals(other.getOpen())) return false; + } + if (hasClose() != other.hasClose()) return false; + if (hasClose()) { + if (!getClose().equals(other.getClose())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOpen()) { + hash = (37 * hash) + OPEN_FIELD_NUMBER; + hash = (53 * hash) + getOpen().hashCode(); + } + if (hasClose()) { + hash = (37 * hash) + CLOSE_FIELD_NUMBER; + hash = (53 * hash) + getClose().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A period the place remains in open_now status.
+       * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.class, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder.class); + } + + // Construct using + // com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + close_ = null; + if (closeBuilder_ != null) { + closeBuilder_.dispose(); + closeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod build() { + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod buildPartial() { + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod result = + new com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.open_ = openBuilder_ == null ? open_ : openBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.close_ = closeBuilder_ == null ? close_ : closeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) { + return mergeFrom( + (com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod other) { + if (other + == com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .getDefaultInstance()) return this; + if (other.hasOpen()) { + mergeOpen(other.getOpen()); + } + if (other.hasClose()) { + mergeClose(other.getClose()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOpenFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCloseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + open_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder> + openBuilder_; + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return Whether the open field is set. + */ + public boolean hasOpen() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + * + * @return The open. + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getOpen() { + if (openBuilder_ == null) { + return open_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : open_; + } else { + return openBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public Builder setOpen( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + value) { + if (openBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + open_ = value; + } else { + openBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public Builder setOpen( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder + builderForValue) { + if (openBuilder_ == null) { + open_ = builderForValue.build(); + } else { + openBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public Builder mergeOpen( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + value) { + if (openBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && open_ != null + && open_ + != com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.getDefaultInstance()) { + getOpenBuilder().mergeFrom(value); + } else { + open_ = value; + } + } else { + openBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public Builder clearOpen() { + bitField0_ = (bitField0_ & ~0x00000001); + open_ = null; + if (openBuilder_ != null) { + openBuilder_.dispose(); + openBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder + getOpenBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOpenFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder + getOpenOrBuilder() { + if (openBuilder_ != null) { + return openBuilder_.getMessageOrBuilder(); + } else { + return open_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : open_; + } + } + /** + * + * + *
+         * The time that the place starts to be open.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint open = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder> + getOpenFieldBuilder() { + if (openBuilder_ == null) { + openBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder>(getOpen(), getParentForChildren(), isClean()); + open_ = null; + } + return openBuilder_; + } + + private com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + close_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder> + closeBuilder_; + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return Whether the close field is set. + */ + public boolean hasClose() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + * + * @return The close. + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + getClose() { + if (closeBuilder_ == null) { + return close_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : close_; + } else { + return closeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public Builder setClose( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + value) { + if (closeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + close_ = value; + } else { + closeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public Builder setClose( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder + builderForValue) { + if (closeBuilder_ == null) { + close_ = builderForValue.build(); + } else { + closeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public Builder mergeClose( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + value) { + if (closeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && close_ != null + && close_ + != com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.getDefaultInstance()) { + getCloseBuilder().mergeFrom(value); + } else { + close_ = value; + } + } else { + closeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public Builder clearClose() { + bitField0_ = (bitField0_ & ~0x00000002); + close_ = null; + if (closeBuilder_ != null) { + closeBuilder_.dispose(); + closeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder + getCloseBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCloseFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder + getCloseOrBuilder() { + if (closeBuilder_ != null) { + return closeBuilder_.getMessageOrBuilder(); + } else { + return close_ == null + ? com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .getDefaultInstance() + : close_; + } + } + /** + * + * + *
+         * The time that the place starts to be closed.
+         * 
+ * + * + * .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint close = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + .Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder> + getCloseFieldBuilder() { + if (closeBuilder_ == null) { + closeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPoint.Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .OpeningHoursPointOrBuilder>(getClose(), getParentForChildren(), isClean()); + close_ = null; + } + return closeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + private static final com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod(); + } + + public static com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpeningHoursPeriod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpecialDayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.OpeningHours.SpecialDay) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + com.google.type.Date getDate(); + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours.SpecialDay} + */ + public static final class SpecialDay extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.OpeningHours.SpecialDay) + SpecialDayOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpecialDay.newBuilder() to construct. + private SpecialDay(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpecialDay() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpecialDay(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.class, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder.class); + } + + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return date_ != null; + } + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + /** + * + * + *
+       * The date of this special day.
+       * 
+ * + * .google.type.Date date = 1; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (date_ != null) { + output.writeMessage(1, getDate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (date_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.OpeningHours.SpecialDay)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.OpeningHours.SpecialDay other = + (com.google.maps.places.v1.Place.OpeningHours.SpecialDay) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * 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.
+       * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours.SpecialDay} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.OpeningHours.SpecialDay) + com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.class, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.OpeningHours.SpecialDay.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.OpeningHours.SpecialDay.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay build() { + com.google.maps.places.v1.Place.OpeningHours.SpecialDay result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay buildPartial() { + com.google.maps.places.v1.Place.OpeningHours.SpecialDay result = + new com.google.maps.places.v1.Place.OpeningHours.SpecialDay(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Place.OpeningHours.SpecialDay result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.OpeningHours.SpecialDay) { + return mergeFrom((com.google.maps.places.v1.Place.OpeningHours.SpecialDay) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.OpeningHours.SpecialDay other) { + if (other == com.google.maps.places.v1.Place.OpeningHours.SpecialDay.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + /** + * + * + *
+         * The date of this special day.
+         * 
+ * + * .google.type.Date date = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>(getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.OpeningHours.SpecialDay) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.OpeningHours.SpecialDay) + private static final com.google.maps.places.v1.Place.OpeningHours.SpecialDay DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + } + + public static com.google.maps.places.v1.Place.OpeningHours.SpecialDay getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpecialDay parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int OPEN_NOW_FIELD_NUMBER = 1; + private boolean openNow_ = false; + /** + * + * + *
+     * Is this place open right now?  Always present unless we lack time-of-day
+     * or timezone data for these opening hours.
+     * 
+ * + * bool open_now = 1; + * + * @return The openNow. + */ + @java.lang.Override + public boolean getOpenNow() { + return openNow_; + } + + public static final int PERIODS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + periods_; + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + @java.lang.Override + public java.util.List + getPeriodsList() { + return periods_; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder> + getPeriodsOrBuilderList() { + return periods_; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + @java.lang.Override + public int getPeriodsCount() { + return periods_.size(); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod getPeriods(int index) { + return periods_.get(index); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder + getPeriodsOrBuilder(int index) { + return periods_.get(index); + } + + public static final int WEEKDAY_DESCRIPTIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList weekdayDescriptions_; + /** + * + * + *
+     * 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; + * + * @return A list containing the weekdayDescriptions. + */ + public com.google.protobuf.ProtocolStringList getWeekdayDescriptionsList() { + return weekdayDescriptions_; + } + /** + * + * + *
+     * 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; + * + * @return The count of weekdayDescriptions. + */ + public int getWeekdayDescriptionsCount() { + return weekdayDescriptions_.size(); + } + /** + * + * + *
+     * 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; + * + * @param index The index of the element to return. + * @return The weekdayDescriptions at the given index. + */ + public java.lang.String getWeekdayDescriptions(int index) { + return weekdayDescriptions_.get(index); + } + /** + * + * + *
+     * 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; + * + * @param index The index of the value to return. + * @return The bytes of the weekdayDescriptions at the given index. + */ + public com.google.protobuf.ByteString getWeekdayDescriptionsBytes(int index) { + return weekdayDescriptions_.getByteString(index); + } + + public static final int SECONDARY_HOUR_TYPE_FIELD_NUMBER = 4; + private int secondaryHourType_ = 0; + /** + * + * + *
+     * A type string used to identify the type of secondary hours.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The enum numeric value on the wire for secondaryHourType. + */ + @java.lang.Override + public int getSecondaryHourTypeValue() { + return secondaryHourType_; + } + /** + * + * + *
+     * A type string used to identify the type of secondary hours.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The secondaryHourType. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType getSecondaryHourType() { + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType result = + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType.forNumber( + secondaryHourType_); + return result == null + ? com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType.UNRECOGNIZED + : result; + } + + public static final int SPECIAL_DAYS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List specialDays_; + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + @java.lang.Override + public java.util.List + getSpecialDaysList() { + return specialDays_; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder> + getSpecialDaysOrBuilderList() { + return specialDays_; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + @java.lang.Override + public int getSpecialDaysCount() { + return specialDays_.size(); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay getSpecialDays(int index) { + return specialDays_.get(index); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder getSpecialDaysOrBuilder( + int index) { + return specialDays_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (openNow_ != false) { + output.writeBool(1, openNow_); + } + for (int i = 0; i < periods_.size(); i++) { + output.writeMessage(2, periods_.get(i)); + } + for (int i = 0; i < weekdayDescriptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, weekdayDescriptions_.getRaw(i)); + } + if (secondaryHourType_ + != com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType + .SECONDARY_HOUR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, secondaryHourType_); + } + for (int i = 0; i < specialDays_.size(); i++) { + output.writeMessage(5, specialDays_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (openNow_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, openNow_); + } + for (int i = 0; i < periods_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, periods_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < weekdayDescriptions_.size(); i++) { + dataSize += computeStringSizeNoTag(weekdayDescriptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getWeekdayDescriptionsList().size(); + } + if (secondaryHourType_ + != com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType + .SECONDARY_HOUR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, secondaryHourType_); + } + for (int i = 0; i < specialDays_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, specialDays_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.OpeningHours)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.OpeningHours other = + (com.google.maps.places.v1.Place.OpeningHours) obj; + + if (getOpenNow() != other.getOpenNow()) return false; + if (!getPeriodsList().equals(other.getPeriodsList())) return false; + if (!getWeekdayDescriptionsList().equals(other.getWeekdayDescriptionsList())) return false; + if (secondaryHourType_ != other.secondaryHourType_) return false; + if (!getSpecialDaysList().equals(other.getSpecialDaysList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPEN_NOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOpenNow()); + if (getPeriodsCount() > 0) { + hash = (37 * hash) + PERIODS_FIELD_NUMBER; + hash = (53 * hash) + getPeriodsList().hashCode(); + } + if (getWeekdayDescriptionsCount() > 0) { + hash = (37 * hash) + WEEKDAY_DESCRIPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getWeekdayDescriptionsList().hashCode(); + } + hash = (37 * hash) + SECONDARY_HOUR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + secondaryHourType_; + if (getSpecialDaysCount() > 0) { + hash = (37 * hash) + SPECIAL_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getSpecialDaysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.OpeningHours parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.OpeningHours prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about business hour of the place.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.OpeningHours} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.OpeningHours) + com.google.maps.places.v1.Place.OpeningHoursOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.OpeningHours.class, + com.google.maps.places.v1.Place.OpeningHours.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.OpeningHours.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + openNow_ = false; + if (periodsBuilder_ == null) { + periods_ = java.util.Collections.emptyList(); + } else { + periods_ = null; + periodsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + weekdayDescriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + secondaryHourType_ = 0; + if (specialDaysBuilder_ == null) { + specialDays_ = java.util.Collections.emptyList(); + } else { + specialDays_ = null; + specialDaysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_OpeningHours_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours build() { + com.google.maps.places.v1.Place.OpeningHours result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours buildPartial() { + com.google.maps.places.v1.Place.OpeningHours result = + new com.google.maps.places.v1.Place.OpeningHours(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.places.v1.Place.OpeningHours result) { + if (periodsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + periods_ = java.util.Collections.unmodifiableList(periods_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.periods_ = periods_; + } else { + result.periods_ = periodsBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + weekdayDescriptions_ = weekdayDescriptions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.weekdayDescriptions_ = weekdayDescriptions_; + if (specialDaysBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + specialDays_ = java.util.Collections.unmodifiableList(specialDays_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.specialDays_ = specialDays_; + } else { + result.specialDays_ = specialDaysBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.places.v1.Place.OpeningHours result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.openNow_ = openNow_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.secondaryHourType_ = secondaryHourType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.OpeningHours) { + return mergeFrom((com.google.maps.places.v1.Place.OpeningHours) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.OpeningHours other) { + if (other == com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()) return this; + if (other.getOpenNow() != false) { + setOpenNow(other.getOpenNow()); + } + if (periodsBuilder_ == null) { + if (!other.periods_.isEmpty()) { + if (periods_.isEmpty()) { + periods_ = other.periods_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePeriodsIsMutable(); + periods_.addAll(other.periods_); + } + onChanged(); + } + } else { + if (!other.periods_.isEmpty()) { + if (periodsBuilder_.isEmpty()) { + periodsBuilder_.dispose(); + periodsBuilder_ = null; + periods_ = other.periods_; + bitField0_ = (bitField0_ & ~0x00000002); + periodsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPeriodsFieldBuilder() + : null; + } else { + periodsBuilder_.addAllMessages(other.periods_); + } + } + } + if (!other.weekdayDescriptions_.isEmpty()) { + if (weekdayDescriptions_.isEmpty()) { + weekdayDescriptions_ = other.weekdayDescriptions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureWeekdayDescriptionsIsMutable(); + weekdayDescriptions_.addAll(other.weekdayDescriptions_); + } + onChanged(); + } + if (other.secondaryHourType_ != 0) { + setSecondaryHourTypeValue(other.getSecondaryHourTypeValue()); + } + if (specialDaysBuilder_ == null) { + if (!other.specialDays_.isEmpty()) { + if (specialDays_.isEmpty()) { + specialDays_ = other.specialDays_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSpecialDaysIsMutable(); + specialDays_.addAll(other.specialDays_); + } + onChanged(); + } + } else { + if (!other.specialDays_.isEmpty()) { + if (specialDaysBuilder_.isEmpty()) { + specialDaysBuilder_.dispose(); + specialDaysBuilder_ = null; + specialDays_ = other.specialDays_; + bitField0_ = (bitField0_ & ~0x00000010); + specialDaysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSpecialDaysFieldBuilder() + : null; + } else { + specialDaysBuilder_.addAllMessages(other.specialDays_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + openNow_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod m = + input.readMessage( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.parser(), + extensionRegistry); + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + periods_.add(m); + } else { + periodsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWeekdayDescriptionsIsMutable(); + weekdayDescriptions_.add(s); + break; + } // case 26 + case 32: + { + secondaryHourType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.maps.places.v1.Place.OpeningHours.SpecialDay m = + input.readMessage( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.parser(), + extensionRegistry); + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + specialDays_.add(m); + } else { + specialDaysBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean openNow_; + /** + * + * + *
+       * Is this place open right now?  Always present unless we lack time-of-day
+       * or timezone data for these opening hours.
+       * 
+ * + * bool open_now = 1; + * + * @return The openNow. + */ + @java.lang.Override + public boolean getOpenNow() { + return openNow_; + } + /** + * + * + *
+       * Is this place open right now?  Always present unless we lack time-of-day
+       * or timezone data for these opening hours.
+       * 
+ * + * bool open_now = 1; + * + * @param value The openNow to set. + * @return This builder for chaining. + */ + public Builder setOpenNow(boolean value) { + + openNow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Is this place open right now?  Always present unless we lack time-of-day
+       * or timezone data for these opening hours.
+       * 
+ * + * bool open_now = 1; + * + * @return This builder for chaining. + */ + public Builder clearOpenNow() { + bitField0_ = (bitField0_ & ~0x00000001); + openNow_ = false; + onChanged(); + return this; + } + + private java.util.List + periods_ = java.util.Collections.emptyList(); + + private void ensurePeriodsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + periods_ = + new java.util.ArrayList< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod>(periods_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder> + periodsBuilder_; + + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public java.util.List + getPeriodsList() { + if (periodsBuilder_ == null) { + return java.util.Collections.unmodifiableList(periods_); + } else { + return periodsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public int getPeriodsCount() { + if (periodsBuilder_ == null) { + return periods_.size(); + } else { + return periodsBuilder_.getCount(); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod getPeriods(int index) { + if (periodsBuilder_ == null) { + return periods_.get(index); + } else { + return periodsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder setPeriods( + int index, com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod value) { + if (periodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePeriodsIsMutable(); + periods_.set(index, value); + onChanged(); + } else { + periodsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder setPeriods( + int index, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder builderForValue) { + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + periods_.set(index, builderForValue.build()); + onChanged(); + } else { + periodsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder addPeriods( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod value) { + if (periodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePeriodsIsMutable(); + periods_.add(value); + onChanged(); + } else { + periodsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder addPeriods( + int index, com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod value) { + if (periodsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePeriodsIsMutable(); + periods_.add(index, value); + onChanged(); + } else { + periodsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder addPeriods( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder builderForValue) { + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + periods_.add(builderForValue.build()); + onChanged(); + } else { + periodsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder addPeriods( + int index, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder builderForValue) { + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + periods_.add(index, builderForValue.build()); + onChanged(); + } else { + periodsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder addAllPeriods( + java.lang.Iterable< + ? extends com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod> + values) { + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, periods_); + onChanged(); + } else { + periodsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder clearPeriods() { + if (periodsBuilder_ == null) { + periods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + periodsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public Builder removePeriods(int index) { + if (periodsBuilder_ == null) { + ensurePeriodsIsMutable(); + periods_.remove(index); + onChanged(); + } else { + periodsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder + getPeriodsBuilder(int index) { + return getPeriodsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder + getPeriodsOrBuilder(int index) { + if (periodsBuilder_ == null) { + return periods_.get(index); + } else { + return periodsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public java.util.List< + ? extends com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder> + getPeriodsOrBuilderList() { + if (periodsBuilder_ != null) { + return periodsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(periods_); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder + addPeriodsBuilder() { + return getPeriodsFieldBuilder() + .addBuilder( + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .getDefaultInstance()); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder + addPeriodsBuilder(int index) { + return getPeriodsFieldBuilder() + .addBuilder( + index, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + .getDefaultInstance()); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod periods = 2; + * + */ + public java.util.List + getPeriodsBuilderList() { + return getPeriodsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder> + getPeriodsFieldBuilder() { + if (periodsBuilder_ == null) { + periodsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.Builder, + com.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriodOrBuilder>( + periods_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + periods_ = null; + } + return periodsBuilder_; + } + + private com.google.protobuf.LazyStringList weekdayDescriptions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureWeekdayDescriptionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + weekdayDescriptions_ = new com.google.protobuf.LazyStringArrayList(weekdayDescriptions_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * 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; + * + * @return A list containing the weekdayDescriptions. + */ + public com.google.protobuf.ProtocolStringList getWeekdayDescriptionsList() { + return weekdayDescriptions_.getUnmodifiableView(); + } + /** + * + * + *
+       * 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; + * + * @return The count of weekdayDescriptions. + */ + public int getWeekdayDescriptionsCount() { + return weekdayDescriptions_.size(); + } + /** + * + * + *
+       * 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; + * + * @param index The index of the element to return. + * @return The weekdayDescriptions at the given index. + */ + public java.lang.String getWeekdayDescriptions(int index) { + return weekdayDescriptions_.get(index); + } + /** + * + * + *
+       * 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; + * + * @param index The index of the value to return. + * @return The bytes of the weekdayDescriptions at the given index. + */ + public com.google.protobuf.ByteString getWeekdayDescriptionsBytes(int index) { + return weekdayDescriptions_.getByteString(index); + } + /** + * + * + *
+       * 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; + * + * @param index The index to set the value at. + * @param value The weekdayDescriptions to set. + * @return This builder for chaining. + */ + public Builder setWeekdayDescriptions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWeekdayDescriptionsIsMutable(); + weekdayDescriptions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The weekdayDescriptions to add. + * @return This builder for chaining. + */ + public Builder addWeekdayDescriptions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWeekdayDescriptionsIsMutable(); + weekdayDescriptions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param values The weekdayDescriptions to add. + * @return This builder for chaining. + */ + public Builder addAllWeekdayDescriptions(java.lang.Iterable values) { + ensureWeekdayDescriptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, weekdayDescriptions_); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearWeekdayDescriptions() { + weekdayDescriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @param value The bytes of the weekdayDescriptions to add. + * @return This builder for chaining. + */ + public Builder addWeekdayDescriptionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWeekdayDescriptionsIsMutable(); + weekdayDescriptions_.add(value); + onChanged(); + return this; + } + + private int secondaryHourType_ = 0; + /** + * + * + *
+       * A type string used to identify the type of secondary hours.
+       * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The enum numeric value on the wire for secondaryHourType. + */ + @java.lang.Override + public int getSecondaryHourTypeValue() { + return secondaryHourType_; + } + /** + * + * + *
+       * A type string used to identify the type of secondary hours.
+       * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @param value The enum numeric value on the wire for secondaryHourType to set. + * @return This builder for chaining. + */ + public Builder setSecondaryHourTypeValue(int value) { + secondaryHourType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * A type string used to identify the type of secondary hours.
+       * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return The secondaryHourType. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType getSecondaryHourType() { + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType result = + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType.forNumber( + secondaryHourType_); + return result == null + ? com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * A type string used to identify the type of secondary hours.
+       * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @param value The secondaryHourType to set. + * @return This builder for chaining. + */ + public Builder setSecondaryHourType( + com.google.maps.places.v1.Place.OpeningHours.SecondaryHourType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + secondaryHourType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * A type string used to identify the type of secondary hours.
+       * 
+ * + * .google.maps.places.v1.Place.OpeningHours.SecondaryHourType secondary_hour_type = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearSecondaryHourType() { + bitField0_ = (bitField0_ & ~0x00000008); + secondaryHourType_ = 0; + onChanged(); + return this; + } + + private java.util.List specialDays_ = + java.util.Collections.emptyList(); + + private void ensureSpecialDaysIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + specialDays_ = + new java.util.ArrayList( + specialDays_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.SpecialDay, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder, + com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder> + specialDaysBuilder_; + + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public java.util.List + getSpecialDaysList() { + if (specialDaysBuilder_ == null) { + return java.util.Collections.unmodifiableList(specialDays_); + } else { + return specialDaysBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public int getSpecialDaysCount() { + if (specialDaysBuilder_ == null) { + return specialDays_.size(); + } else { + return specialDaysBuilder_.getCount(); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay getSpecialDays(int index) { + if (specialDaysBuilder_ == null) { + return specialDays_.get(index); + } else { + return specialDaysBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder setSpecialDays( + int index, com.google.maps.places.v1.Place.OpeningHours.SpecialDay value) { + if (specialDaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialDaysIsMutable(); + specialDays_.set(index, value); + onChanged(); + } else { + specialDaysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder setSpecialDays( + int index, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder builderForValue) { + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + specialDays_.set(index, builderForValue.build()); + onChanged(); + } else { + specialDaysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder addSpecialDays(com.google.maps.places.v1.Place.OpeningHours.SpecialDay value) { + if (specialDaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialDaysIsMutable(); + specialDays_.add(value); + onChanged(); + } else { + specialDaysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder addSpecialDays( + int index, com.google.maps.places.v1.Place.OpeningHours.SpecialDay value) { + if (specialDaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpecialDaysIsMutable(); + specialDays_.add(index, value); + onChanged(); + } else { + specialDaysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder addSpecialDays( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder builderForValue) { + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + specialDays_.add(builderForValue.build()); + onChanged(); + } else { + specialDaysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder addSpecialDays( + int index, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder builderForValue) { + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + specialDays_.add(index, builderForValue.build()); + onChanged(); + } else { + specialDaysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder addAllSpecialDays( + java.lang.Iterable + values) { + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, specialDays_); + onChanged(); + } else { + specialDaysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder clearSpecialDays() { + if (specialDaysBuilder_ == null) { + specialDays_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + specialDaysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public Builder removeSpecialDays(int index) { + if (specialDaysBuilder_ == null) { + ensureSpecialDaysIsMutable(); + specialDays_.remove(index); + onChanged(); + } else { + specialDaysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder getSpecialDaysBuilder( + int index) { + return getSpecialDaysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder + getSpecialDaysOrBuilder(int index) { + if (specialDaysBuilder_ == null) { + return specialDays_.get(index); + } else { + return specialDaysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public java.util.List< + ? extends com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder> + getSpecialDaysOrBuilderList() { + if (specialDaysBuilder_ != null) { + return specialDaysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(specialDays_); + } + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder + addSpecialDaysBuilder() { + return getSpecialDaysFieldBuilder() + .addBuilder( + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.getDefaultInstance()); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder addSpecialDaysBuilder( + int index) { + return getSpecialDaysFieldBuilder() + .addBuilder( + index, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.getDefaultInstance()); + } + /** + * + * + *
+       * 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 .google.maps.places.v1.Place.OpeningHours.SpecialDay special_days = 5; + * + */ + public java.util.List + getSpecialDaysBuilderList() { + return getSpecialDaysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.SpecialDay, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder, + com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder> + getSpecialDaysFieldBuilder() { + if (specialDaysBuilder_ == null) { + specialDaysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours.SpecialDay, + com.google.maps.places.v1.Place.OpeningHours.SpecialDay.Builder, + com.google.maps.places.v1.Place.OpeningHours.SpecialDayOrBuilder>( + specialDays_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + specialDays_ = null; + } + return specialDaysBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.OpeningHours) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.OpeningHours) + private static final com.google.maps.places.v1.Place.OpeningHours DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.OpeningHours(); + } + + public static com.google.maps.places.v1.Place.OpeningHours getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpeningHours parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.Attribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the Place's data provider.
+     * 
+ * + * string provider = 1; + * + * @return The provider. + */ + java.lang.String getProvider(); + /** + * + * + *
+     * Name of the Place's data provider.
+     * 
+ * + * string provider = 1; + * + * @return The bytes for provider. + */ + com.google.protobuf.ByteString getProviderBytes(); + + /** + * + * + *
+     * URI to the Place's data provider.
+     * 
+ * + * string provider_uri = 2; + * + * @return The providerUri. + */ + java.lang.String getProviderUri(); + /** + * + * + *
+     * URI to the Place's data provider.
+     * 
+ * + * string provider_uri = 2; + * + * @return The bytes for providerUri. + */ + com.google.protobuf.ByteString getProviderUriBytes(); + } + /** + * + * + *
+   * Information about data providers of this place.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.Attribution} + */ + public static final class Attribution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.Attribution) + AttributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Attribution.newBuilder() to construct. + private Attribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Attribution() { + provider_ = ""; + providerUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Attribution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Attribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Attribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.Attribution.class, + com.google.maps.places.v1.Place.Attribution.Builder.class); + } + + public static final int PROVIDER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object provider_ = ""; + /** + * + * + *
+     * Name of the Place's data provider.
+     * 
+ * + * string provider = 1; + * + * @return The provider. + */ + @java.lang.Override + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the Place's data provider.
+     * 
+ * + * string provider = 1; + * + * @return The bytes for provider. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDER_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object providerUri_ = ""; + /** + * + * + *
+     * URI to the Place's data provider.
+     * 
+ * + * string provider_uri = 2; + * + * @return The providerUri. + */ + @java.lang.Override + public java.lang.String getProviderUri() { + java.lang.Object ref = providerUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerUri_ = s; + return s; + } + } + /** + * + * + *
+     * URI to the Place's data provider.
+     * 
+ * + * string provider_uri = 2; + * + * @return The bytes for providerUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProviderUriBytes() { + java.lang.Object ref = providerUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provider_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, provider_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(providerUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, providerUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provider_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, provider_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(providerUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, providerUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.Attribution)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.Attribution other = + (com.google.maps.places.v1.Place.Attribution) obj; + + if (!getProvider().equals(other.getProvider())) return false; + if (!getProviderUri().equals(other.getProviderUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getProvider().hashCode(); + hash = (37 * hash) + PROVIDER_URI_FIELD_NUMBER; + hash = (53 * hash) + getProviderUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Attribution parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Attribution parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.Attribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.Attribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about data providers of this place.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.Attribution} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.Attribution) + com.google.maps.places.v1.Place.AttributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Attribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Attribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.Attribution.class, + com.google.maps.places.v1.Place.Attribution.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.Attribution.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + provider_ = ""; + providerUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_Attribution_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Attribution getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.Attribution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Attribution build() { + com.google.maps.places.v1.Place.Attribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Attribution buildPartial() { + com.google.maps.places.v1.Place.Attribution result = + new com.google.maps.places.v1.Place.Attribution(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Place.Attribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.provider_ = provider_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.providerUri_ = providerUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.Attribution) { + return mergeFrom((com.google.maps.places.v1.Place.Attribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.Attribution other) { + if (other == com.google.maps.places.v1.Place.Attribution.getDefaultInstance()) return this; + if (!other.getProvider().isEmpty()) { + provider_ = other.provider_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProviderUri().isEmpty()) { + providerUri_ = other.providerUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + provider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + providerUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object provider_ = ""; + /** + * + * + *
+       * Name of the Place's data provider.
+       * 
+ * + * string provider = 1; + * + * @return The provider. + */ + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the Place's data provider.
+       * 
+ * + * string provider = 1; + * + * @return The bytes for provider. + */ + public com.google.protobuf.ByteString getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the Place's data provider.
+       * 
+ * + * string provider = 1; + * + * @param value The provider to set. + * @return This builder for chaining. + */ + public Builder setProvider(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + provider_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the Place's data provider.
+       * 
+ * + * string provider = 1; + * + * @return This builder for chaining. + */ + public Builder clearProvider() { + provider_ = getDefaultInstance().getProvider(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the Place's data provider.
+       * 
+ * + * string provider = 1; + * + * @param value The bytes for provider to set. + * @return This builder for chaining. + */ + public Builder setProviderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + provider_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object providerUri_ = ""; + /** + * + * + *
+       * URI to the Place's data provider.
+       * 
+ * + * string provider_uri = 2; + * + * @return The providerUri. + */ + public java.lang.String getProviderUri() { + java.lang.Object ref = providerUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI to the Place's data provider.
+       * 
+ * + * string provider_uri = 2; + * + * @return The bytes for providerUri. + */ + public com.google.protobuf.ByteString getProviderUriBytes() { + java.lang.Object ref = providerUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI to the Place's data provider.
+       * 
+ * + * string provider_uri = 2; + * + * @param value The providerUri to set. + * @return This builder for chaining. + */ + public Builder setProviderUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + providerUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * URI to the Place's data provider.
+       * 
+ * + * string provider_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearProviderUri() { + providerUri_ = getDefaultInstance().getProviderUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * URI to the Place's data provider.
+       * 
+ * + * string provider_uri = 2; + * + * @param value The bytes for providerUri to set. + * @return This builder for chaining. + */ + public Builder setProviderUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + providerUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.Attribution) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.Attribution) + private static final com.google.maps.places.v1.Place.Attribution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.Attribution(); + } + + public static com.google.maps.places.v1.Place.Attribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.Attribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EditorialSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place.EditorialSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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 overview = 1; + * + * @return Whether the overview field is set. + */ + boolean hasOverview(); + /** + * + * + *
+     * 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 overview = 1; + * + * @return The overview. + */ + com.google.type.LocalizedText getOverview(); + /** + * + * + *
+     * 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 overview = 1; + */ + com.google.type.LocalizedTextOrBuilder getOverviewOrBuilder(); + } + /** + * + * + *
+   * Contains a summary of the place.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.EditorialSummary} + */ + public static final class EditorialSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.Place.EditorialSummary) + EditorialSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use EditorialSummary.newBuilder() to construct. + private EditorialSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EditorialSummary() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EditorialSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_EditorialSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.EditorialSummary.class, + com.google.maps.places.v1.Place.EditorialSummary.Builder.class); + } + + public static final int OVERVIEW_FIELD_NUMBER = 1; + private com.google.type.LocalizedText overview_; + /** + * + * + *
+     * 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 overview = 1; + * + * @return Whether the overview field is set. + */ + @java.lang.Override + public boolean hasOverview() { + return overview_ != null; + } + /** + * + * + *
+     * 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 overview = 1; + * + * @return The overview. + */ + @java.lang.Override + public com.google.type.LocalizedText getOverview() { + return overview_ == null ? com.google.type.LocalizedText.getDefaultInstance() : overview_; + } + /** + * + * + *
+     * 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 overview = 1; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getOverviewOrBuilder() { + return overview_ == null ? com.google.type.LocalizedText.getDefaultInstance() : overview_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (overview_ != null) { + output.writeMessage(1, getOverview()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (overview_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOverview()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place.EditorialSummary)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place.EditorialSummary other = + (com.google.maps.places.v1.Place.EditorialSummary) obj; + + if (hasOverview() != other.hasOverview()) return false; + if (hasOverview()) { + if (!getOverview().equals(other.getOverview())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOverview()) { + hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; + hash = (53 * hash) + getOverview().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place.EditorialSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place.EditorialSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Contains a summary of the place.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.Place.EditorialSummary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place.EditorialSummary) + com.google.maps.places.v1.Place.EditorialSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_EditorialSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.EditorialSummary.class, + com.google.maps.places.v1.Place.EditorialSummary.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.EditorialSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + overview_ = null; + if (overviewBuilder_ != null) { + overviewBuilder_.dispose(); + overviewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummary getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummary build() { + com.google.maps.places.v1.Place.EditorialSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummary buildPartial() { + com.google.maps.places.v1.Place.EditorialSummary result = + new com.google.maps.places.v1.Place.EditorialSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.Place.EditorialSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.overview_ = overviewBuilder_ == null ? overview_ : overviewBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place.EditorialSummary) { + return mergeFrom((com.google.maps.places.v1.Place.EditorialSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place.EditorialSummary other) { + if (other == com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance()) + return this; + if (other.hasOverview()) { + mergeOverview(other.getOverview()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOverviewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.LocalizedText overview_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + overviewBuilder_; + /** + * + * + *
+       * 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 overview = 1; + * + * @return Whether the overview field is set. + */ + public boolean hasOverview() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * 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 overview = 1; + * + * @return The overview. + */ + public com.google.type.LocalizedText getOverview() { + if (overviewBuilder_ == null) { + return overview_ == null ? com.google.type.LocalizedText.getDefaultInstance() : overview_; + } else { + return overviewBuilder_.getMessage(); + } + } + /** + * + * + *
+       * 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 overview = 1; + */ + public Builder setOverview(com.google.type.LocalizedText value) { + if (overviewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + overview_ = value; + } else { + overviewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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 overview = 1; + */ + public Builder setOverview(com.google.type.LocalizedText.Builder builderForValue) { + if (overviewBuilder_ == null) { + overview_ = builderForValue.build(); + } else { + overviewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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 overview = 1; + */ + public Builder mergeOverview(com.google.type.LocalizedText value) { + if (overviewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && overview_ != null + && overview_ != com.google.type.LocalizedText.getDefaultInstance()) { + getOverviewBuilder().mergeFrom(value); + } else { + overview_ = value; + } + } else { + overviewBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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 overview = 1; + */ + public Builder clearOverview() { + bitField0_ = (bitField0_ & ~0x00000001); + overview_ = null; + if (overviewBuilder_ != null) { + overviewBuilder_.dispose(); + overviewBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * 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 overview = 1; + */ + public com.google.type.LocalizedText.Builder getOverviewBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOverviewFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * 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 overview = 1; + */ + public com.google.type.LocalizedTextOrBuilder getOverviewOrBuilder() { + if (overviewBuilder_ != null) { + return overviewBuilder_.getMessageOrBuilder(); + } else { + return overview_ == null ? com.google.type.LocalizedText.getDefaultInstance() : overview_; + } + } + /** + * + * + *
+       * 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 overview = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + getOverviewFieldBuilder() { + if (overviewBuilder_ == null) { + overviewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getOverview(), getParentForChildren(), isClean()); + overview_ = null; + } + return overviewBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place.EditorialSummary) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place.EditorialSummary) + private static final com.google.maps.places.v1.Place.EditorialSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place.EditorialSummary(); + } + + public static com.google.maps.places.v1.Place.EditorialSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EditorialSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Required. The unique identifier of a place.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The unique identifier of a place.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 31; + private com.google.type.LocalizedText displayName_; + /** + * + * + *
+   * 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; + * + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return displayName_ != null; + } + /** + * + * + *
+   * 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; + * + * @return The displayName. + */ + @java.lang.Override + public com.google.type.LocalizedText getDisplayName() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + /** + * + * + *
+   * 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; + */ + @java.lang.Override + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + return displayName_ == null ? com.google.type.LocalizedText.getDefaultInstance() : displayName_; + } + + public static final int TYPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList types_; + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_; + } + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int NATIONAL_PHONE_NUMBER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object nationalPhoneNumber_ = ""; + /** + * + * + *
+   * A human-readable phone number for the place, in national format.
+   * 
+ * + * string national_phone_number = 7; + * + * @return The nationalPhoneNumber. + */ + @java.lang.Override + public java.lang.String getNationalPhoneNumber() { + java.lang.Object ref = nationalPhoneNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nationalPhoneNumber_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable phone number for the place, in national format.
+   * 
+ * + * string national_phone_number = 7; + * + * @return The bytes for nationalPhoneNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNationalPhoneNumberBytes() { + java.lang.Object ref = nationalPhoneNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nationalPhoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNATIONAL_PHONE_NUMBER_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object internationalPhoneNumber_ = ""; + /** + * + * + *
+   * A human-readable phone number for the place, in international format.
+   * 
+ * + * string international_phone_number = 8; + * + * @return The internationalPhoneNumber. + */ + @java.lang.Override + public java.lang.String getInternationalPhoneNumber() { + java.lang.Object ref = internationalPhoneNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internationalPhoneNumber_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable phone number for the place, in international format.
+   * 
+ * + * string international_phone_number = 8; + * + * @return The bytes for internationalPhoneNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInternationalPhoneNumberBytes() { + java.lang.Object ref = internationalPhoneNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internationalPhoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORMATTED_ADDRESS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object formattedAddress_ = ""; + /** + * + * + *
+   * A full, human-readable address for this place.
+   * 
+ * + * string formatted_address = 9; + * + * @return The formattedAddress. + */ + @java.lang.Override + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } + } + /** + * + * + *
+   * A full, human-readable address for this place.
+   * 
+ * + * string formatted_address = 9; + * + * @return The bytes for formattedAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_COMPONENTS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List addressComponents_; + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + @java.lang.Override + public java.util.List + getAddressComponentsList() { + return addressComponents_; + } + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + @java.lang.Override + public java.util.List + getAddressComponentsOrBuilderList() { + return addressComponents_; + } + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + @java.lang.Override + public int getAddressComponentsCount() { + return addressComponents_.size(); + } + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponent getAddressComponents(int index) { + return addressComponents_.get(index); + } + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOrBuilder( + int index) { + return addressComponents_.get(index); + } + + public static final int PLUS_CODE_FIELD_NUMBER = 11; + private com.google.maps.places.v1.Place.PlusCode plusCode_; + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return Whether the plusCode field is set. + */ + @java.lang.Override + public boolean hasPlusCode() { + return plusCode_ != null; + } + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return The plusCode. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCode getPlusCode() { + return plusCode_ == null + ? com.google.maps.places.v1.Place.PlusCode.getDefaultInstance() + : plusCode_; + } + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.PlusCodeOrBuilder getPlusCodeOrBuilder() { + return plusCode_ == null + ? com.google.maps.places.v1.Place.PlusCode.getDefaultInstance() + : plusCode_; + } + + public static final int LOCATION_FIELD_NUMBER = 12; + private com.google.type.LatLng location_; + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + * + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + * + * @return The location. + */ + @java.lang.Override + public com.google.type.LatLng getLocation() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + + public static final int VIEWPORT_FIELD_NUMBER = 13; + private com.google.geo.type.Viewport viewport_; + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return Whether the viewport field is set. + */ + @java.lang.Override + public boolean hasViewport() { + return viewport_ != null; + } + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return The viewport. + */ + @java.lang.Override + public com.google.geo.type.Viewport getViewport() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + + public static final int RATING_FIELD_NUMBER = 14; + private double rating_ = 0D; + /** + * + * + *
+   * A rating between 1.0 and 5.0, based on user reviews of this place.
+   * 
+ * + * double rating = 14; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + + public static final int GOOGLE_MAPS_URI_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object googleMapsUri_ = ""; + /** + * + * + *
+   * A URL providing more information about this place.
+   * 
+ * + * string google_maps_uri = 15; + * + * @return The googleMapsUri. + */ + @java.lang.Override + public java.lang.String getGoogleMapsUri() { + java.lang.Object ref = googleMapsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleMapsUri_ = s; + return s; + } + } + /** + * + * + *
+   * A URL providing more information about this place.
+   * 
+ * + * string google_maps_uri = 15; + * + * @return The bytes for googleMapsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoogleMapsUriBytes() { + java.lang.Object ref = googleMapsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleMapsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITE_URI_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object websiteUri_ = ""; + /** + * + * + *
+   * 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; + * + * @return The websiteUri. + */ + @java.lang.Override + public java.lang.String getWebsiteUri() { + java.lang.Object ref = websiteUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + websiteUri_ = s; + return s; + } + } + /** + * + * + *
+   * 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; + * + * @return The bytes for websiteUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebsiteUriBytes() { + java.lang.Object ref = websiteUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + websiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEWS_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private java.util.List reviews_; + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + @java.lang.Override + public java.util.List getReviewsList() { + return reviews_; + } + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + @java.lang.Override + public java.util.List + getReviewsOrBuilderList() { + return reviews_; + } + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + @java.lang.Override + public int getReviewsCount() { + return reviews_.size(); + } + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.Review getReviews(int index) { + return reviews_.get(index); + } + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.ReviewOrBuilder getReviewsOrBuilder(int index) { + return reviews_.get(index); + } + + public static final int OPENING_HOURS_FIELD_NUMBER = 21; + private com.google.maps.places.v1.Place.OpeningHours openingHours_; + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return Whether the openingHours field is set. + */ + @java.lang.Override + public boolean hasOpeningHours() { + return openingHours_ != null; + } + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return The openingHours. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getOpeningHours() { + return openingHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : openingHours_; + } + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getOpeningHoursOrBuilder() { + return openingHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : openingHours_; + } + + public static final int UTC_OFFSET_MINUTES_FIELD_NUMBER = 22; + private int utcOffsetMinutes_ = 0; + /** + * + * + *
+   * 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.
+   * 
+ * + * int32 utc_offset_minutes = 22; + * + * @return The utcOffsetMinutes. + */ + @java.lang.Override + public int getUtcOffsetMinutes() { + return utcOffsetMinutes_; + } + + public static final int ADR_FORMAT_ADDRESS_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object adrFormatAddress_ = ""; + /** + * + * + *
+   * The place's address in adr microformat: http://microformats.org/wiki/adr.
+   * 
+ * + * string adr_format_address = 24; + * + * @return The adrFormatAddress. + */ + @java.lang.Override + public java.lang.String getAdrFormatAddress() { + java.lang.Object ref = adrFormatAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adrFormatAddress_ = s; + return s; + } + } + /** + * + * + *
+   * The place's address in adr microformat: http://microformats.org/wiki/adr.
+   * 
+ * + * string adr_format_address = 24; + * + * @return The bytes for adrFormatAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdrFormatAddressBytes() { + java.lang.Object ref = adrFormatAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adrFormatAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUSINESS_STATUS_FIELD_NUMBER = 25; + private int businessStatus_ = 0; + /** + * + * + *
+   * The business status for the place.
+   * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The enum numeric value on the wire for businessStatus. + */ + @java.lang.Override + public int getBusinessStatusValue() { + return businessStatus_; + } + /** + * + * + *
+   * The business status for the place.
+   * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The businessStatus. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.BusinessStatus getBusinessStatus() { + com.google.maps.places.v1.Place.BusinessStatus result = + com.google.maps.places.v1.Place.BusinessStatus.forNumber(businessStatus_); + return result == null ? com.google.maps.places.v1.Place.BusinessStatus.UNRECOGNIZED : result; + } + + public static final int PRICE_LEVEL_FIELD_NUMBER = 26; + private int priceLevel_ = 0; + /** + * + * + *
+   * Price level of the place.
+   * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The enum numeric value on the wire for priceLevel. + */ + @java.lang.Override + public int getPriceLevelValue() { + return priceLevel_; + } + /** + * + * + *
+   * Price level of the place.
+   * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The priceLevel. + */ + @java.lang.Override + public com.google.maps.places.v1.PriceLevel getPriceLevel() { + com.google.maps.places.v1.PriceLevel result = + com.google.maps.places.v1.PriceLevel.forNumber(priceLevel_); + return result == null ? com.google.maps.places.v1.PriceLevel.UNRECOGNIZED : result; + } + + public static final int ATTRIBUTIONS_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private java.util.List attributions_; + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + @java.lang.Override + public java.util.List getAttributionsList() { + return attributions_; + } + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + @java.lang.Override + public java.util.List + getAttributionsOrBuilderList() { + return attributions_; + } + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + @java.lang.Override + public int getAttributionsCount() { + return attributions_.size(); + } + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.Attribution getAttributions(int index) { + return attributions_.get(index); + } + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.AttributionOrBuilder getAttributionsOrBuilder(int index) { + return attributions_.get(index); + } + + public static final int USER_RATING_COUNT_FIELD_NUMBER = 28; + private int userRatingCount_ = 0; + /** + * + * + *
+   * The total number of reviews (with or without text) for this place.
+   * 
+ * + * int32 user_rating_count = 28; + * + * @return The userRatingCount. + */ + @java.lang.Override + public int getUserRatingCount() { + return userRatingCount_; + } + + public static final int ICON_MASK_BASE_URI_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private volatile java.lang.Object iconMaskBaseUri_ = ""; + /** + * + * + *
+   * A truncated URL to an v2 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; + * + * @return The iconMaskBaseUri. + */ + @java.lang.Override + public java.lang.String getIconMaskBaseUri() { + java.lang.Object ref = iconMaskBaseUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iconMaskBaseUri_ = s; + return s; + } + } + /** + * + * + *
+   * A truncated URL to an v2 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; + * + * @return The bytes for iconMaskBaseUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIconMaskBaseUriBytes() { + java.lang.Object ref = iconMaskBaseUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconMaskBaseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICON_BACKGROUND_COLOR_FIELD_NUMBER = 30; + + @SuppressWarnings("serial") + private volatile java.lang.Object iconBackgroundColor_ = ""; + /** + * + * + *
+   * Background color for icon_mask in hex format, e.g. #909CE1.
+   * 
+ * + * string icon_background_color = 30; + * + * @return The iconBackgroundColor. + */ + @java.lang.Override + public java.lang.String getIconBackgroundColor() { + java.lang.Object ref = iconBackgroundColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iconBackgroundColor_ = s; + return s; + } + } + /** + * + * + *
+   * Background color for icon_mask in hex format, e.g. #909CE1.
+   * 
+ * + * string icon_background_color = 30; + * + * @return The bytes for iconBackgroundColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIconBackgroundColorBytes() { + java.lang.Object ref = iconBackgroundColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconBackgroundColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAKEOUT_FIELD_NUMBER = 33; + private boolean takeout_ = false; + /** + * + * + *
+   * Specifies if the business supports takeout.
+   * 
+ * + * optional bool takeout = 33; + * + * @return Whether the takeout field is set. + */ + @java.lang.Override + public boolean hasTakeout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Specifies if the business supports takeout.
+   * 
+ * + * optional bool takeout = 33; + * + * @return The takeout. + */ + @java.lang.Override + public boolean getTakeout() { + return takeout_; + } + + public static final int DELIVERY_FIELD_NUMBER = 34; + private boolean delivery_ = false; + /** + * + * + *
+   * Specifies if the business supports delivery.
+   * 
+ * + * optional bool delivery = 34; + * + * @return Whether the delivery field is set. + */ + @java.lang.Override + public boolean hasDelivery() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Specifies if the business supports delivery.
+   * 
+ * + * optional bool delivery = 34; + * + * @return The delivery. + */ + @java.lang.Override + public boolean getDelivery() { + return delivery_; + } + + public static final int DINE_IN_FIELD_NUMBER = 35; + private boolean dineIn_ = false; + /** + * + * + *
+   * Specifies if the business supports indoor or outdoor seating options.
+   * 
+ * + * optional bool dine_in = 35; + * + * @return Whether the dineIn field is set. + */ + @java.lang.Override + public boolean hasDineIn() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Specifies if the business supports indoor or outdoor seating options.
+   * 
+ * + * optional bool dine_in = 35; + * + * @return The dineIn. + */ + @java.lang.Override + public boolean getDineIn() { + return dineIn_; + } + + public static final int CURBSIDE_PICKUP_FIELD_NUMBER = 36; + private boolean curbsidePickup_ = false; + /** + * + * + *
+   * Specifies if the business supports curbside pickup.
+   * 
+ * + * optional bool curbside_pickup = 36; + * + * @return Whether the curbsidePickup field is set. + */ + @java.lang.Override + public boolean hasCurbsidePickup() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Specifies if the business supports curbside pickup.
+   * 
+ * + * optional bool curbside_pickup = 36; + * + * @return The curbsidePickup. + */ + @java.lang.Override + public boolean getCurbsidePickup() { + return curbsidePickup_; + } + + public static final int WHEELCHAIR_ACCESSIBLE_ENTRANCE_FIELD_NUMBER = 37; + private boolean wheelchairAccessibleEntrance_ = false; + /** + * + * + *
+   * Specifies if the place has an entrance that is wheelchair-accessible.
+   * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return Whether the wheelchairAccessibleEntrance field is set. + */ + @java.lang.Override + public boolean hasWheelchairAccessibleEntrance() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Specifies if the place has an entrance that is wheelchair-accessible.
+   * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return The wheelchairAccessibleEntrance. + */ + @java.lang.Override + public boolean getWheelchairAccessibleEntrance() { + return wheelchairAccessibleEntrance_; + } + + public static final int RESERVABLE_FIELD_NUMBER = 38; + private boolean reservable_ = false; + /** + * + * + *
+   * Specifies if the place supports reservations.
+   * 
+ * + * optional bool reservable = 38; + * + * @return Whether the reservable field is set. + */ + @java.lang.Override + public boolean hasReservable() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Specifies if the place supports reservations.
+   * 
+ * + * optional bool reservable = 38; + * + * @return The reservable. + */ + @java.lang.Override + public boolean getReservable() { + return reservable_; + } + + public static final int SERVES_BREAKFAST_FIELD_NUMBER = 39; + private boolean servesBreakfast_ = false; + /** + * + * + *
+   * Specifies if the place serves breakfast.
+   * 
+ * + * optional bool serves_breakfast = 39; + * + * @return Whether the servesBreakfast field is set. + */ + @java.lang.Override + public boolean hasServesBreakfast() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Specifies if the place serves breakfast.
+   * 
+ * + * optional bool serves_breakfast = 39; + * + * @return The servesBreakfast. + */ + @java.lang.Override + public boolean getServesBreakfast() { + return servesBreakfast_; + } + + public static final int SERVES_LUNCH_FIELD_NUMBER = 40; + private boolean servesLunch_ = false; + /** + * + * + *
+   * Specifies if the place serves lunch.
+   * 
+ * + * optional bool serves_lunch = 40; + * + * @return Whether the servesLunch field is set. + */ + @java.lang.Override + public boolean hasServesLunch() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Specifies if the place serves lunch.
+   * 
+ * + * optional bool serves_lunch = 40; + * + * @return The servesLunch. + */ + @java.lang.Override + public boolean getServesLunch() { + return servesLunch_; + } + + public static final int SERVES_DINNER_FIELD_NUMBER = 41; + private boolean servesDinner_ = false; + /** + * + * + *
+   * Specifies if the place serves dinner.
+   * 
+ * + * optional bool serves_dinner = 41; + * + * @return Whether the servesDinner field is set. + */ + @java.lang.Override + public boolean hasServesDinner() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+   * Specifies if the place serves dinner.
+   * 
+ * + * optional bool serves_dinner = 41; + * + * @return The servesDinner. + */ + @java.lang.Override + public boolean getServesDinner() { + return servesDinner_; + } + + public static final int SERVES_BEER_FIELD_NUMBER = 42; + private boolean servesBeer_ = false; + /** + * + * + *
+   * Specifies if the place serves beer.
+   * 
+ * + * optional bool serves_beer = 42; + * + * @return Whether the servesBeer field is set. + */ + @java.lang.Override + public boolean hasServesBeer() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+   * Specifies if the place serves beer.
+   * 
+ * + * optional bool serves_beer = 42; + * + * @return The servesBeer. + */ + @java.lang.Override + public boolean getServesBeer() { + return servesBeer_; + } + + public static final int SERVES_WINE_FIELD_NUMBER = 43; + private boolean servesWine_ = false; + /** + * + * + *
+   * Specifies if the place serves wine.
+   * 
+ * + * optional bool serves_wine = 43; + * + * @return Whether the servesWine field is set. + */ + @java.lang.Override + public boolean hasServesWine() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+   * Specifies if the place serves wine.
+   * 
+ * + * optional bool serves_wine = 43; + * + * @return The servesWine. + */ + @java.lang.Override + public boolean getServesWine() { + return servesWine_; + } + + public static final int SERVES_BRUNCH_FIELD_NUMBER = 44; + private boolean servesBrunch_ = false; + /** + * + * + *
+   * Specifies if the place serves brunch.
+   * 
+ * + * optional bool serves_brunch = 44; + * + * @return Whether the servesBrunch field is set. + */ + @java.lang.Override + public boolean hasServesBrunch() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+   * Specifies if the place serves brunch.
+   * 
+ * + * optional bool serves_brunch = 44; + * + * @return The servesBrunch. + */ + @java.lang.Override + public boolean getServesBrunch() { + return servesBrunch_; + } + + public static final int SERVES_VEGETARIAN_FOOD_FIELD_NUMBER = 45; + private boolean servesVegetarianFood_ = false; + /** + * + * + *
+   * Specifies if the place serves vegetarian food.
+   * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return Whether the servesVegetarianFood field is set. + */ + @java.lang.Override + public boolean hasServesVegetarianFood() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+   * Specifies if the place serves vegetarian food.
+   * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return The servesVegetarianFood. + */ + @java.lang.Override + public boolean getServesVegetarianFood() { + return servesVegetarianFood_; + } + + public static final int CURRENT_OPENING_HOURS_FIELD_NUMBER = 46; + private com.google.maps.places.v1.Place.OpeningHours currentOpeningHours_; + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return Whether the currentOpeningHours field is set. + */ + @java.lang.Override + public boolean hasCurrentOpeningHours() { + return currentOpeningHours_ != null; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return The currentOpeningHours. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getCurrentOpeningHours() { + return currentOpeningHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : currentOpeningHours_; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getCurrentOpeningHoursOrBuilder() { + return currentOpeningHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : currentOpeningHours_; + } + + public static final int CURRENT_SECONDARY_OPENING_HOURS_FIELD_NUMBER = 47; + + @SuppressWarnings("serial") + private java.util.List + currentSecondaryOpeningHours_; + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + @java.lang.Override + public java.util.List + getCurrentSecondaryOpeningHoursList() { + return currentSecondaryOpeningHours_; + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + @java.lang.Override + public java.util.List + getCurrentSecondaryOpeningHoursOrBuilderList() { + return currentSecondaryOpeningHours_; + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + @java.lang.Override + public int getCurrentSecondaryOpeningHoursCount() { + return currentSecondaryOpeningHours_.size(); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getCurrentSecondaryOpeningHours(int index) { + return currentSecondaryOpeningHours_.get(index); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder + getCurrentSecondaryOpeningHoursOrBuilder(int index) { + return currentSecondaryOpeningHours_.get(index); + } + + public static final int SECONDARY_OPENING_HOURS_FIELD_NUMBER = 49; + + @SuppressWarnings("serial") + private java.util.List secondaryOpeningHours_; + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + @java.lang.Override + public java.util.List + getSecondaryOpeningHoursList() { + return secondaryOpeningHours_; + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + @java.lang.Override + public java.util.List + getSecondaryOpeningHoursOrBuilderList() { + return secondaryOpeningHours_; + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + @java.lang.Override + public int getSecondaryOpeningHoursCount() { + return secondaryOpeningHours_.size(); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHours getSecondaryOpeningHours(int index) { + return secondaryOpeningHours_.get(index); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getSecondaryOpeningHoursOrBuilder( + int index) { + return secondaryOpeningHours_.get(index); + } + + public static final int EDITORIAL_SUMMARY_FIELD_NUMBER = 48; + private com.google.maps.places.v1.Place.EditorialSummary editorialSummary_; + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return Whether the editorialSummary field is set. + */ + @java.lang.Override + public boolean hasEditorialSummary() { + return editorialSummary_ != null; + } + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return The editorialSummary. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummary getEditorialSummary() { + return editorialSummary_ == null + ? com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance() + : editorialSummary_; + } + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + @java.lang.Override + public com.google.maps.places.v1.Place.EditorialSummaryOrBuilder getEditorialSummaryOrBuilder() { + return editorialSummary_ == null + ? com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance() + : editorialSummary_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, types_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nationalPhoneNumber_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, nationalPhoneNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internationalPhoneNumber_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, internationalPhoneNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, formattedAddress_); + } + for (int i = 0; i < addressComponents_.size(); i++) { + output.writeMessage(10, addressComponents_.get(i)); + } + if (plusCode_ != null) { + output.writeMessage(11, getPlusCode()); + } + if (location_ != null) { + output.writeMessage(12, getLocation()); + } + if (viewport_ != null) { + output.writeMessage(13, getViewport()); + } + if (java.lang.Double.doubleToRawLongBits(rating_) != 0) { + output.writeDouble(14, rating_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleMapsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, googleMapsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(websiteUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, websiteUri_); + } + for (int i = 0; i < reviews_.size(); i++) { + output.writeMessage(20, reviews_.get(i)); + } + if (openingHours_ != null) { + output.writeMessage(21, getOpeningHours()); + } + if (utcOffsetMinutes_ != 0) { + output.writeInt32(22, utcOffsetMinutes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(adrFormatAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, adrFormatAddress_); + } + if (businessStatus_ + != com.google.maps.places.v1.Place.BusinessStatus.BUSINESS_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(25, businessStatus_); + } + if (priceLevel_ != com.google.maps.places.v1.PriceLevel.PRICE_LEVEL_UNSPECIFIED.getNumber()) { + output.writeEnum(26, priceLevel_); + } + for (int i = 0; i < attributions_.size(); i++) { + output.writeMessage(27, attributions_.get(i)); + } + if (userRatingCount_ != 0) { + output.writeInt32(28, userRatingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iconMaskBaseUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, iconMaskBaseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iconBackgroundColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 30, iconBackgroundColor_); + } + if (displayName_ != null) { + output.writeMessage(31, getDisplayName()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(33, takeout_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(34, delivery_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(35, dineIn_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(36, curbsidePickup_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeBool(37, wheelchairAccessibleEntrance_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBool(38, reservable_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeBool(39, servesBreakfast_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeBool(40, servesLunch_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(41, servesDinner_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeBool(42, servesBeer_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeBool(43, servesWine_); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeBool(44, servesBrunch_); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeBool(45, servesVegetarianFood_); + } + if (currentOpeningHours_ != null) { + output.writeMessage(46, getCurrentOpeningHours()); + } + for (int i = 0; i < currentSecondaryOpeningHours_.size(); i++) { + output.writeMessage(47, currentSecondaryOpeningHours_.get(i)); + } + if (editorialSummary_ != null) { + output.writeMessage(48, getEditorialSummary()); + } + for (int i = 0; i < secondaryOpeningHours_.size(); i++) { + output.writeMessage(49, secondaryOpeningHours_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nationalPhoneNumber_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, nationalPhoneNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internationalPhoneNumber_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(8, internationalPhoneNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, formattedAddress_); + } + for (int i = 0; i < addressComponents_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, addressComponents_.get(i)); + } + if (plusCode_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPlusCode()); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLocation()); + } + if (viewport_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getViewport()); + } + if (java.lang.Double.doubleToRawLongBits(rating_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(14, rating_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleMapsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, googleMapsUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(websiteUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, websiteUri_); + } + for (int i = 0; i < reviews_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, reviews_.get(i)); + } + if (openingHours_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getOpeningHours()); + } + if (utcOffsetMinutes_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(22, utcOffsetMinutes_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(adrFormatAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, adrFormatAddress_); + } + if (businessStatus_ + != com.google.maps.places.v1.Place.BusinessStatus.BUSINESS_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(25, businessStatus_); + } + if (priceLevel_ != com.google.maps.places.v1.PriceLevel.PRICE_LEVEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, priceLevel_); + } + for (int i = 0; i < attributions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, attributions_.get(i)); + } + if (userRatingCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(28, userRatingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iconMaskBaseUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, iconMaskBaseUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iconBackgroundColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, iconBackgroundColor_); + } + if (displayName_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getDisplayName()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(33, takeout_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(34, delivery_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(35, dineIn_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(36, curbsidePickup_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(37, wheelchairAccessibleEntrance_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(38, reservable_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(39, servesBreakfast_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(40, servesLunch_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(41, servesDinner_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(42, servesBeer_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(43, servesWine_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(44, servesBrunch_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(45, servesVegetarianFood_); + } + if (currentOpeningHours_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(46, getCurrentOpeningHours()); + } + for (int i = 0; i < currentSecondaryOpeningHours_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 47, currentSecondaryOpeningHours_.get(i)); + } + if (editorialSummary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(48, getEditorialSummary()); + } + for (int i = 0; i < secondaryOpeningHours_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 49, secondaryOpeningHours_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.Place)) { + return super.equals(obj); + } + com.google.maps.places.v1.Place other = (com.google.maps.places.v1.Place) obj; + + if (!getId().equals(other.getId())) return false; + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName().equals(other.getDisplayName())) return false; + } + if (!getTypesList().equals(other.getTypesList())) return false; + if (!getNationalPhoneNumber().equals(other.getNationalPhoneNumber())) return false; + if (!getInternationalPhoneNumber().equals(other.getInternationalPhoneNumber())) return false; + if (!getFormattedAddress().equals(other.getFormattedAddress())) return false; + if (!getAddressComponentsList().equals(other.getAddressComponentsList())) return false; + if (hasPlusCode() != other.hasPlusCode()) return false; + if (hasPlusCode()) { + if (!getPlusCode().equals(other.getPlusCode())) return false; + } + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (hasViewport() != other.hasViewport()) return false; + if (hasViewport()) { + if (!getViewport().equals(other.getViewport())) return false; + } + if (java.lang.Double.doubleToLongBits(getRating()) + != java.lang.Double.doubleToLongBits(other.getRating())) return false; + if (!getGoogleMapsUri().equals(other.getGoogleMapsUri())) return false; + if (!getWebsiteUri().equals(other.getWebsiteUri())) return false; + if (!getReviewsList().equals(other.getReviewsList())) return false; + if (hasOpeningHours() != other.hasOpeningHours()) return false; + if (hasOpeningHours()) { + if (!getOpeningHours().equals(other.getOpeningHours())) return false; + } + if (getUtcOffsetMinutes() != other.getUtcOffsetMinutes()) return false; + if (!getAdrFormatAddress().equals(other.getAdrFormatAddress())) return false; + if (businessStatus_ != other.businessStatus_) return false; + if (priceLevel_ != other.priceLevel_) return false; + if (!getAttributionsList().equals(other.getAttributionsList())) return false; + if (getUserRatingCount() != other.getUserRatingCount()) return false; + if (!getIconMaskBaseUri().equals(other.getIconMaskBaseUri())) return false; + if (!getIconBackgroundColor().equals(other.getIconBackgroundColor())) return false; + if (hasTakeout() != other.hasTakeout()) return false; + if (hasTakeout()) { + if (getTakeout() != other.getTakeout()) return false; + } + if (hasDelivery() != other.hasDelivery()) return false; + if (hasDelivery()) { + if (getDelivery() != other.getDelivery()) return false; + } + if (hasDineIn() != other.hasDineIn()) return false; + if (hasDineIn()) { + if (getDineIn() != other.getDineIn()) return false; + } + if (hasCurbsidePickup() != other.hasCurbsidePickup()) return false; + if (hasCurbsidePickup()) { + if (getCurbsidePickup() != other.getCurbsidePickup()) return false; + } + if (hasWheelchairAccessibleEntrance() != other.hasWheelchairAccessibleEntrance()) return false; + if (hasWheelchairAccessibleEntrance()) { + if (getWheelchairAccessibleEntrance() != other.getWheelchairAccessibleEntrance()) + return false; + } + if (hasReservable() != other.hasReservable()) return false; + if (hasReservable()) { + if (getReservable() != other.getReservable()) return false; + } + if (hasServesBreakfast() != other.hasServesBreakfast()) return false; + if (hasServesBreakfast()) { + if (getServesBreakfast() != other.getServesBreakfast()) return false; + } + if (hasServesLunch() != other.hasServesLunch()) return false; + if (hasServesLunch()) { + if (getServesLunch() != other.getServesLunch()) return false; + } + if (hasServesDinner() != other.hasServesDinner()) return false; + if (hasServesDinner()) { + if (getServesDinner() != other.getServesDinner()) return false; + } + if (hasServesBeer() != other.hasServesBeer()) return false; + if (hasServesBeer()) { + if (getServesBeer() != other.getServesBeer()) return false; + } + if (hasServesWine() != other.hasServesWine()) return false; + if (hasServesWine()) { + if (getServesWine() != other.getServesWine()) return false; + } + if (hasServesBrunch() != other.hasServesBrunch()) return false; + if (hasServesBrunch()) { + if (getServesBrunch() != other.getServesBrunch()) return false; + } + if (hasServesVegetarianFood() != other.hasServesVegetarianFood()) return false; + if (hasServesVegetarianFood()) { + if (getServesVegetarianFood() != other.getServesVegetarianFood()) return false; + } + if (hasCurrentOpeningHours() != other.hasCurrentOpeningHours()) return false; + if (hasCurrentOpeningHours()) { + if (!getCurrentOpeningHours().equals(other.getCurrentOpeningHours())) return false; + } + if (!getCurrentSecondaryOpeningHoursList().equals(other.getCurrentSecondaryOpeningHoursList())) + return false; + if (!getSecondaryOpeningHoursList().equals(other.getSecondaryOpeningHoursList())) return false; + if (hasEditorialSummary() != other.hasEditorialSummary()) return false; + if (hasEditorialSummary()) { + if (!getEditorialSummary().equals(other.getEditorialSummary())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + hash = (37 * hash) + NATIONAL_PHONE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNationalPhoneNumber().hashCode(); + hash = (37 * hash) + INTERNATIONAL_PHONE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getInternationalPhoneNumber().hashCode(); + hash = (37 * hash) + FORMATTED_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getFormattedAddress().hashCode(); + if (getAddressComponentsCount() > 0) { + hash = (37 * hash) + ADDRESS_COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getAddressComponentsList().hashCode(); + } + if (hasPlusCode()) { + hash = (37 * hash) + PLUS_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPlusCode().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasViewport()) { + hash = (37 * hash) + VIEWPORT_FIELD_NUMBER; + hash = (53 * hash) + getViewport().hashCode(); + } + hash = (37 * hash) + RATING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getRating())); + hash = (37 * hash) + GOOGLE_MAPS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGoogleMapsUri().hashCode(); + hash = (37 * hash) + WEBSITE_URI_FIELD_NUMBER; + hash = (53 * hash) + getWebsiteUri().hashCode(); + if (getReviewsCount() > 0) { + hash = (37 * hash) + REVIEWS_FIELD_NUMBER; + hash = (53 * hash) + getReviewsList().hashCode(); + } + if (hasOpeningHours()) { + hash = (37 * hash) + OPENING_HOURS_FIELD_NUMBER; + hash = (53 * hash) + getOpeningHours().hashCode(); + } + hash = (37 * hash) + UTC_OFFSET_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getUtcOffsetMinutes(); + hash = (37 * hash) + ADR_FORMAT_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAdrFormatAddress().hashCode(); + hash = (37 * hash) + BUSINESS_STATUS_FIELD_NUMBER; + hash = (53 * hash) + businessStatus_; + hash = (37 * hash) + PRICE_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + priceLevel_; + if (getAttributionsCount() > 0) { + hash = (37 * hash) + ATTRIBUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAttributionsList().hashCode(); + } + hash = (37 * hash) + USER_RATING_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getUserRatingCount(); + hash = (37 * hash) + ICON_MASK_BASE_URI_FIELD_NUMBER; + hash = (53 * hash) + getIconMaskBaseUri().hashCode(); + hash = (37 * hash) + ICON_BACKGROUND_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getIconBackgroundColor().hashCode(); + if (hasTakeout()) { + hash = (37 * hash) + TAKEOUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTakeout()); + } + if (hasDelivery()) { + hash = (37 * hash) + DELIVERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDelivery()); + } + if (hasDineIn()) { + hash = (37 * hash) + DINE_IN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDineIn()); + } + if (hasCurbsidePickup()) { + hash = (37 * hash) + CURBSIDE_PICKUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCurbsidePickup()); + } + if (hasWheelchairAccessibleEntrance()) { + hash = (37 * hash) + WHEELCHAIR_ACCESSIBLE_ENTRANCE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWheelchairAccessibleEntrance()); + } + if (hasReservable()) { + hash = (37 * hash) + RESERVABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReservable()); + } + if (hasServesBreakfast()) { + hash = (37 * hash) + SERVES_BREAKFAST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesBreakfast()); + } + if (hasServesLunch()) { + hash = (37 * hash) + SERVES_LUNCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesLunch()); + } + if (hasServesDinner()) { + hash = (37 * hash) + SERVES_DINNER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesDinner()); + } + if (hasServesBeer()) { + hash = (37 * hash) + SERVES_BEER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesBeer()); + } + if (hasServesWine()) { + hash = (37 * hash) + SERVES_WINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesWine()); + } + if (hasServesBrunch()) { + hash = (37 * hash) + SERVES_BRUNCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesBrunch()); + } + if (hasServesVegetarianFood()) { + hash = (37 * hash) + SERVES_VEGETARIAN_FOOD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getServesVegetarianFood()); + } + if (hasCurrentOpeningHours()) { + hash = (37 * hash) + CURRENT_OPENING_HOURS_FIELD_NUMBER; + hash = (53 * hash) + getCurrentOpeningHours().hashCode(); + } + if (getCurrentSecondaryOpeningHoursCount() > 0) { + hash = (37 * hash) + CURRENT_SECONDARY_OPENING_HOURS_FIELD_NUMBER; + hash = (53 * hash) + getCurrentSecondaryOpeningHoursList().hashCode(); + } + if (getSecondaryOpeningHoursCount() > 0) { + hash = (37 * hash) + SECONDARY_OPENING_HOURS_FIELD_NUMBER; + hash = (53 * hash) + getSecondaryOpeningHoursList().hashCode(); + } + if (hasEditorialSummary()) { + hash = (37 * hash) + EDITORIAL_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getEditorialSummary().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.Place parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.Place parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.Place parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.Place parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.Place parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.Place prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * All the information representing a Place.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.Place} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.Place) + com.google.maps.places.v1.PlaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.Place.class, com.google.maps.places.v1.Place.Builder.class); + } + + // Construct using com.google.maps.places.v1.Place.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + id_ = ""; + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + nationalPhoneNumber_ = ""; + internationalPhoneNumber_ = ""; + formattedAddress_ = ""; + if (addressComponentsBuilder_ == null) { + addressComponents_ = java.util.Collections.emptyList(); + } else { + addressComponents_ = null; + addressComponentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + rating_ = 0D; + googleMapsUri_ = ""; + websiteUri_ = ""; + if (reviewsBuilder_ == null) { + reviews_ = java.util.Collections.emptyList(); + } else { + reviews_ = null; + reviewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + openingHours_ = null; + if (openingHoursBuilder_ != null) { + openingHoursBuilder_.dispose(); + openingHoursBuilder_ = null; + } + utcOffsetMinutes_ = 0; + adrFormatAddress_ = ""; + businessStatus_ = 0; + priceLevel_ = 0; + if (attributionsBuilder_ == null) { + attributions_ = java.util.Collections.emptyList(); + } else { + attributions_ = null; + attributionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + userRatingCount_ = 0; + iconMaskBaseUri_ = ""; + iconBackgroundColor_ = ""; + takeout_ = false; + delivery_ = false; + dineIn_ = false; + curbsidePickup_ = false; + wheelchairAccessibleEntrance_ = false; + reservable_ = false; + servesBreakfast_ = false; + servesLunch_ = false; + servesDinner_ = false; + servesBeer_ = false; + servesWine_ = false; + servesBrunch_ = false; + servesVegetarianFood_ = false; + currentOpeningHours_ = null; + if (currentOpeningHoursBuilder_ != null) { + currentOpeningHoursBuilder_.dispose(); + currentOpeningHoursBuilder_ = null; + } + if (currentSecondaryOpeningHoursBuilder_ == null) { + currentSecondaryOpeningHours_ = java.util.Collections.emptyList(); + } else { + currentSecondaryOpeningHours_ = null; + currentSecondaryOpeningHoursBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000020); + if (secondaryOpeningHoursBuilder_ == null) { + secondaryOpeningHours_ = java.util.Collections.emptyList(); + } else { + secondaryOpeningHours_ = null; + secondaryOpeningHoursBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000040); + editorialSummary_ = null; + if (editorialSummaryBuilder_ != null) { + editorialSummaryBuilder_.dispose(); + editorialSummaryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlaceProto + .internal_static_google_maps_places_v1_Place_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.Place getDefaultInstanceForType() { + return com.google.maps.places.v1.Place.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.Place build() { + com.google.maps.places.v1.Place result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.Place buildPartial() { + com.google.maps.places.v1.Place result = new com.google.maps.places.v1.Place(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.places.v1.Place result) { + if (((bitField0_ & 0x00000004) != 0)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.types_ = types_; + if (addressComponentsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + addressComponents_ = java.util.Collections.unmodifiableList(addressComponents_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.addressComponents_ = addressComponents_; + } else { + result.addressComponents_ = addressComponentsBuilder_.build(); + } + if (reviewsBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + reviews_ = java.util.Collections.unmodifiableList(reviews_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.reviews_ = reviews_; + } else { + result.reviews_ = reviewsBuilder_.build(); + } + if (attributionsBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0)) { + attributions_ = java.util.Collections.unmodifiableList(attributions_); + bitField0_ = (bitField0_ & ~0x00080000); + } + result.attributions_ = attributions_; + } else { + result.attributions_ = attributionsBuilder_.build(); + } + if (currentSecondaryOpeningHoursBuilder_ == null) { + if (((bitField1_ & 0x00000020) != 0)) { + currentSecondaryOpeningHours_ = + java.util.Collections.unmodifiableList(currentSecondaryOpeningHours_); + bitField1_ = (bitField1_ & ~0x00000020); + } + result.currentSecondaryOpeningHours_ = currentSecondaryOpeningHours_; + } else { + result.currentSecondaryOpeningHours_ = currentSecondaryOpeningHoursBuilder_.build(); + } + if (secondaryOpeningHoursBuilder_ == null) { + if (((bitField1_ & 0x00000040) != 0)) { + secondaryOpeningHours_ = java.util.Collections.unmodifiableList(secondaryOpeningHours_); + bitField1_ = (bitField1_ & ~0x00000040); + } + result.secondaryOpeningHours_ = secondaryOpeningHours_; + } else { + result.secondaryOpeningHours_ = secondaryOpeningHoursBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.places.v1.Place result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = + displayNameBuilder_ == null ? displayName_ : displayNameBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nationalPhoneNumber_ = nationalPhoneNumber_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.internationalPhoneNumber_ = internationalPhoneNumber_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.formattedAddress_ = formattedAddress_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.plusCode_ = plusCodeBuilder_ == null ? plusCode_ : plusCodeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.viewport_ = viewportBuilder_ == null ? viewport_ : viewportBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.rating_ = rating_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.googleMapsUri_ = googleMapsUri_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.websiteUri_ = websiteUri_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.openingHours_ = + openingHoursBuilder_ == null ? openingHours_ : openingHoursBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.utcOffsetMinutes_ = utcOffsetMinutes_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.adrFormatAddress_ = adrFormatAddress_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.businessStatus_ = businessStatus_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.priceLevel_ = priceLevel_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.userRatingCount_ = userRatingCount_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.iconMaskBaseUri_ = iconMaskBaseUri_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.iconBackgroundColor_ = iconBackgroundColor_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00800000) != 0)) { + result.takeout_ = takeout_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.delivery_ = delivery_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.dineIn_ = dineIn_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.curbsidePickup_ = curbsidePickup_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.wheelchairAccessibleEntrance_ = wheelchairAccessibleEntrance_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.reservable_ = reservable_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.servesBreakfast_ = servesBreakfast_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.servesLunch_ = servesLunch_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.servesDinner_ = servesDinner_; + to_bitField0_ |= 0x00000100; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(com.google.maps.places.v1.Place result) { + int from_bitField1_ = bitField1_; + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.servesBeer_ = servesBeer_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.servesWine_ = servesWine_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.servesBrunch_ = servesBrunch_; + to_bitField0_ |= 0x00000800; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.servesVegetarianFood_ = servesVegetarianFood_; + to_bitField0_ |= 0x00001000; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.currentOpeningHours_ = + currentOpeningHoursBuilder_ == null + ? currentOpeningHours_ + : currentOpeningHoursBuilder_.build(); + } + if (((from_bitField1_ & 0x00000080) != 0)) { + result.editorialSummary_ = + editorialSummaryBuilder_ == null ? editorialSummary_ : editorialSummaryBuilder_.build(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.Place) { + return mergeFrom((com.google.maps.places.v1.Place) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.Place other) { + if (other == com.google.maps.places.v1.Place.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDisplayName()) { + mergeDisplayName(other.getDisplayName()); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.getNationalPhoneNumber().isEmpty()) { + nationalPhoneNumber_ = other.nationalPhoneNumber_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getInternationalPhoneNumber().isEmpty()) { + internationalPhoneNumber_ = other.internationalPhoneNumber_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getFormattedAddress().isEmpty()) { + formattedAddress_ = other.formattedAddress_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (addressComponentsBuilder_ == null) { + if (!other.addressComponents_.isEmpty()) { + if (addressComponents_.isEmpty()) { + addressComponents_ = other.addressComponents_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureAddressComponentsIsMutable(); + addressComponents_.addAll(other.addressComponents_); + } + onChanged(); + } + } else { + if (!other.addressComponents_.isEmpty()) { + if (addressComponentsBuilder_.isEmpty()) { + addressComponentsBuilder_.dispose(); + addressComponentsBuilder_ = null; + addressComponents_ = other.addressComponents_; + bitField0_ = (bitField0_ & ~0x00000040); + addressComponentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAddressComponentsFieldBuilder() + : null; + } else { + addressComponentsBuilder_.addAllMessages(other.addressComponents_); + } + } + } + if (other.hasPlusCode()) { + mergePlusCode(other.getPlusCode()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasViewport()) { + mergeViewport(other.getViewport()); + } + if (other.getRating() != 0D) { + setRating(other.getRating()); + } + if (!other.getGoogleMapsUri().isEmpty()) { + googleMapsUri_ = other.googleMapsUri_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getWebsiteUri().isEmpty()) { + websiteUri_ = other.websiteUri_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (reviewsBuilder_ == null) { + if (!other.reviews_.isEmpty()) { + if (reviews_.isEmpty()) { + reviews_ = other.reviews_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureReviewsIsMutable(); + reviews_.addAll(other.reviews_); + } + onChanged(); + } + } else { + if (!other.reviews_.isEmpty()) { + if (reviewsBuilder_.isEmpty()) { + reviewsBuilder_.dispose(); + reviewsBuilder_ = null; + reviews_ = other.reviews_; + bitField0_ = (bitField0_ & ~0x00002000); + reviewsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReviewsFieldBuilder() + : null; + } else { + reviewsBuilder_.addAllMessages(other.reviews_); + } + } + } + if (other.hasOpeningHours()) { + mergeOpeningHours(other.getOpeningHours()); + } + if (other.getUtcOffsetMinutes() != 0) { + setUtcOffsetMinutes(other.getUtcOffsetMinutes()); + } + if (!other.getAdrFormatAddress().isEmpty()) { + adrFormatAddress_ = other.adrFormatAddress_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.businessStatus_ != 0) { + setBusinessStatusValue(other.getBusinessStatusValue()); + } + if (other.priceLevel_ != 0) { + setPriceLevelValue(other.getPriceLevelValue()); + } + if (attributionsBuilder_ == null) { + if (!other.attributions_.isEmpty()) { + if (attributions_.isEmpty()) { + attributions_ = other.attributions_; + bitField0_ = (bitField0_ & ~0x00080000); + } else { + ensureAttributionsIsMutable(); + attributions_.addAll(other.attributions_); + } + onChanged(); + } + } else { + if (!other.attributions_.isEmpty()) { + if (attributionsBuilder_.isEmpty()) { + attributionsBuilder_.dispose(); + attributionsBuilder_ = null; + attributions_ = other.attributions_; + bitField0_ = (bitField0_ & ~0x00080000); + attributionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributionsFieldBuilder() + : null; + } else { + attributionsBuilder_.addAllMessages(other.attributions_); + } + } + } + if (other.getUserRatingCount() != 0) { + setUserRatingCount(other.getUserRatingCount()); + } + if (!other.getIconMaskBaseUri().isEmpty()) { + iconMaskBaseUri_ = other.iconMaskBaseUri_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (!other.getIconBackgroundColor().isEmpty()) { + iconBackgroundColor_ = other.iconBackgroundColor_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (other.hasTakeout()) { + setTakeout(other.getTakeout()); + } + if (other.hasDelivery()) { + setDelivery(other.getDelivery()); + } + if (other.hasDineIn()) { + setDineIn(other.getDineIn()); + } + if (other.hasCurbsidePickup()) { + setCurbsidePickup(other.getCurbsidePickup()); + } + if (other.hasWheelchairAccessibleEntrance()) { + setWheelchairAccessibleEntrance(other.getWheelchairAccessibleEntrance()); + } + if (other.hasReservable()) { + setReservable(other.getReservable()); + } + if (other.hasServesBreakfast()) { + setServesBreakfast(other.getServesBreakfast()); + } + if (other.hasServesLunch()) { + setServesLunch(other.getServesLunch()); + } + if (other.hasServesDinner()) { + setServesDinner(other.getServesDinner()); + } + if (other.hasServesBeer()) { + setServesBeer(other.getServesBeer()); + } + if (other.hasServesWine()) { + setServesWine(other.getServesWine()); + } + if (other.hasServesBrunch()) { + setServesBrunch(other.getServesBrunch()); + } + if (other.hasServesVegetarianFood()) { + setServesVegetarianFood(other.getServesVegetarianFood()); + } + if (other.hasCurrentOpeningHours()) { + mergeCurrentOpeningHours(other.getCurrentOpeningHours()); + } + if (currentSecondaryOpeningHoursBuilder_ == null) { + if (!other.currentSecondaryOpeningHours_.isEmpty()) { + if (currentSecondaryOpeningHours_.isEmpty()) { + currentSecondaryOpeningHours_ = other.currentSecondaryOpeningHours_; + bitField1_ = (bitField1_ & ~0x00000020); + } else { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.addAll(other.currentSecondaryOpeningHours_); + } + onChanged(); + } + } else { + if (!other.currentSecondaryOpeningHours_.isEmpty()) { + if (currentSecondaryOpeningHoursBuilder_.isEmpty()) { + currentSecondaryOpeningHoursBuilder_.dispose(); + currentSecondaryOpeningHoursBuilder_ = null; + currentSecondaryOpeningHours_ = other.currentSecondaryOpeningHours_; + bitField1_ = (bitField1_ & ~0x00000020); + currentSecondaryOpeningHoursBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCurrentSecondaryOpeningHoursFieldBuilder() + : null; + } else { + currentSecondaryOpeningHoursBuilder_.addAllMessages( + other.currentSecondaryOpeningHours_); + } + } + } + if (secondaryOpeningHoursBuilder_ == null) { + if (!other.secondaryOpeningHours_.isEmpty()) { + if (secondaryOpeningHours_.isEmpty()) { + secondaryOpeningHours_ = other.secondaryOpeningHours_; + bitField1_ = (bitField1_ & ~0x00000040); + } else { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.addAll(other.secondaryOpeningHours_); + } + onChanged(); + } + } else { + if (!other.secondaryOpeningHours_.isEmpty()) { + if (secondaryOpeningHoursBuilder_.isEmpty()) { + secondaryOpeningHoursBuilder_.dispose(); + secondaryOpeningHoursBuilder_ = null; + secondaryOpeningHours_ = other.secondaryOpeningHours_; + bitField1_ = (bitField1_ & ~0x00000040); + secondaryOpeningHoursBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSecondaryOpeningHoursFieldBuilder() + : null; + } else { + secondaryOpeningHoursBuilder_.addAllMessages(other.secondaryOpeningHours_); + } + } + } + if (other.hasEditorialSummary()) { + mergeEditorialSummary(other.getEditorialSummary()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypesIsMutable(); + types_.add(s); + break; + } // case 42 + case 58: + { + nationalPhoneNumber_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 66: + { + internationalPhoneNumber_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 74: + { + formattedAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 82: + { + com.google.maps.places.v1.Place.AddressComponent m = + input.readMessage( + com.google.maps.places.v1.Place.AddressComponent.parser(), + extensionRegistry); + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(m); + } else { + addressComponentsBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + input.readMessage(getPlusCodeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 90 + case 98: + { + input.readMessage(getLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 98 + case 106: + { + input.readMessage(getViewportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 106 + case 113: + { + rating_ = input.readDouble(); + bitField0_ |= 0x00000400; + break; + } // case 113 + case 122: + { + googleMapsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 122 + case 130: + { + websiteUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 130 + case 162: + { + com.google.maps.places.v1.Place.Review m = + input.readMessage( + com.google.maps.places.v1.Place.Review.parser(), extensionRegistry); + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + reviews_.add(m); + } else { + reviewsBuilder_.addMessage(m); + } + break; + } // case 162 + case 170: + { + input.readMessage(getOpeningHoursFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 170 + case 176: + { + utcOffsetMinutes_ = input.readInt32(); + bitField0_ |= 0x00008000; + break; + } // case 176 + case 194: + { + adrFormatAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 194 + case 200: + { + businessStatus_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 200 + case 208: + { + priceLevel_ = input.readEnum(); + bitField0_ |= 0x00040000; + break; + } // case 208 + case 218: + { + com.google.maps.places.v1.Place.Attribution m = + input.readMessage( + com.google.maps.places.v1.Place.Attribution.parser(), extensionRegistry); + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + attributions_.add(m); + } else { + attributionsBuilder_.addMessage(m); + } + break; + } // case 218 + case 224: + { + userRatingCount_ = input.readInt32(); + bitField0_ |= 0x00100000; + break; + } // case 224 + case 234: + { + iconMaskBaseUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 234 + case 242: + { + iconBackgroundColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 242 + case 250: + { + input.readMessage(getDisplayNameFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 250 + case 264: + { + takeout_ = input.readBool(); + bitField0_ |= 0x00800000; + break; + } // case 264 + case 272: + { + delivery_ = input.readBool(); + bitField0_ |= 0x01000000; + break; + } // case 272 + case 280: + { + dineIn_ = input.readBool(); + bitField0_ |= 0x02000000; + break; + } // case 280 + case 288: + { + curbsidePickup_ = input.readBool(); + bitField0_ |= 0x04000000; + break; + } // case 288 + case 296: + { + wheelchairAccessibleEntrance_ = input.readBool(); + bitField0_ |= 0x08000000; + break; + } // case 296 + case 304: + { + reservable_ = input.readBool(); + bitField0_ |= 0x10000000; + break; + } // case 304 + case 312: + { + servesBreakfast_ = input.readBool(); + bitField0_ |= 0x20000000; + break; + } // case 312 + case 320: + { + servesLunch_ = input.readBool(); + bitField0_ |= 0x40000000; + break; + } // case 320 + case 328: + { + servesDinner_ = input.readBool(); + bitField0_ |= 0x80000000; + break; + } // case 328 + case 336: + { + servesBeer_ = input.readBool(); + bitField1_ |= 0x00000001; + break; + } // case 336 + case 344: + { + servesWine_ = input.readBool(); + bitField1_ |= 0x00000002; + break; + } // case 344 + case 352: + { + servesBrunch_ = input.readBool(); + bitField1_ |= 0x00000004; + break; + } // case 352 + case 360: + { + servesVegetarianFood_ = input.readBool(); + bitField1_ |= 0x00000008; + break; + } // case 360 + case 370: + { + input.readMessage( + getCurrentOpeningHoursFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000010; + break; + } // case 370 + case 378: + { + com.google.maps.places.v1.Place.OpeningHours m = + input.readMessage( + com.google.maps.places.v1.Place.OpeningHours.parser(), extensionRegistry); + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.add(m); + } else { + currentSecondaryOpeningHoursBuilder_.addMessage(m); + } + break; + } // case 378 + case 386: + { + input.readMessage( + getEditorialSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000080; + break; + } // case 386 + case 394: + { + com.google.maps.places.v1.Place.OpeningHours m = + input.readMessage( + com.google.maps.places.v1.Place.OpeningHours.parser(), extensionRegistry); + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.add(m); + } else { + secondaryOpeningHoursBuilder_.addMessage(m); + } + break; + } // case 394 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Required. The unique identifier of a place.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of a place.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of a place.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of a place.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of a place.
+     * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.type.LocalizedText displayName_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + displayNameBuilder_; + /** + * + * + *
+     * 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; + * + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * 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; + * + * @return The displayName. + */ + public com.google.type.LocalizedText getDisplayName() { + if (displayNameBuilder_ == null) { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } else { + return displayNameBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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; + */ + public Builder setDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + } else { + displayNameBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder setDisplayName(com.google.type.LocalizedText.Builder builderForValue) { + if (displayNameBuilder_ == null) { + displayName_ = builderForValue.build(); + } else { + displayNameBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder mergeDisplayName(com.google.type.LocalizedText value) { + if (displayNameBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && displayName_ != null + && displayName_ != com.google.type.LocalizedText.getDefaultInstance()) { + getDisplayNameBuilder().mergeFrom(value); + } else { + displayName_ = value; + } + } else { + displayNameBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public Builder clearDisplayName() { + bitField0_ = (bitField0_ & ~0x00000002); + displayName_ = null; + if (displayNameBuilder_ != null) { + displayNameBuilder_.dispose(); + displayNameBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + */ + public com.google.type.LocalizedText.Builder getDisplayNameBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDisplayNameFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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; + */ + public com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder() { + if (displayNameBuilder_ != null) { + return displayNameBuilder_.getMessageOrBuilder(); + } else { + return displayName_ == null + ? com.google.type.LocalizedText.getDefaultInstance() + : displayName_; + } + } + /** + * + * + *
+     * 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; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder> + getDisplayNameFieldBuilder() { + if (displayNameBuilder_ == null) { + displayNameBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LocalizedText, + com.google.type.LocalizedText.Builder, + com.google.type.LocalizedTextOrBuilder>( + getDisplayName(), getParentForChildren(), isClean()); + displayName_ = null; + } + return displayNameBuilder_; + } + + private com.google.protobuf.LazyStringList types_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList getTypesList() { + return types_.getUnmodifiableView(); + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes(java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, types_); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A set of type tags for this result. For example, "political" and
+     * "locality".
+     * 
+ * + * repeated string types = 5; + * + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + + private java.lang.Object nationalPhoneNumber_ = ""; + /** + * + * + *
+     * A human-readable phone number for the place, in national format.
+     * 
+ * + * string national_phone_number = 7; + * + * @return The nationalPhoneNumber. + */ + public java.lang.String getNationalPhoneNumber() { + java.lang.Object ref = nationalPhoneNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nationalPhoneNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable phone number for the place, in national format.
+     * 
+ * + * string national_phone_number = 7; + * + * @return The bytes for nationalPhoneNumber. + */ + public com.google.protobuf.ByteString getNationalPhoneNumberBytes() { + java.lang.Object ref = nationalPhoneNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nationalPhoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable phone number for the place, in national format.
+     * 
+ * + * string national_phone_number = 7; + * + * @param value The nationalPhoneNumber to set. + * @return This builder for chaining. + */ + public Builder setNationalPhoneNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nationalPhoneNumber_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable phone number for the place, in national format.
+     * 
+ * + * string national_phone_number = 7; + * + * @return This builder for chaining. + */ + public Builder clearNationalPhoneNumber() { + nationalPhoneNumber_ = getDefaultInstance().getNationalPhoneNumber(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable phone number for the place, in national format.
+     * 
+ * + * string national_phone_number = 7; + * + * @param value The bytes for nationalPhoneNumber to set. + * @return This builder for chaining. + */ + public Builder setNationalPhoneNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nationalPhoneNumber_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object internationalPhoneNumber_ = ""; + /** + * + * + *
+     * A human-readable phone number for the place, in international format.
+     * 
+ * + * string international_phone_number = 8; + * + * @return The internationalPhoneNumber. + */ + public java.lang.String getInternationalPhoneNumber() { + java.lang.Object ref = internationalPhoneNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internationalPhoneNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable phone number for the place, in international format.
+     * 
+ * + * string international_phone_number = 8; + * + * @return The bytes for internationalPhoneNumber. + */ + public com.google.protobuf.ByteString getInternationalPhoneNumberBytes() { + java.lang.Object ref = internationalPhoneNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + internationalPhoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable phone number for the place, in international format.
+     * 
+ * + * string international_phone_number = 8; + * + * @param value The internationalPhoneNumber to set. + * @return This builder for chaining. + */ + public Builder setInternationalPhoneNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + internationalPhoneNumber_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable phone number for the place, in international format.
+     * 
+ * + * string international_phone_number = 8; + * + * @return This builder for chaining. + */ + public Builder clearInternationalPhoneNumber() { + internationalPhoneNumber_ = getDefaultInstance().getInternationalPhoneNumber(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable phone number for the place, in international format.
+     * 
+ * + * string international_phone_number = 8; + * + * @param value The bytes for internationalPhoneNumber to set. + * @return This builder for chaining. + */ + public Builder setInternationalPhoneNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + internationalPhoneNumber_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object formattedAddress_ = ""; + /** + * + * + *
+     * A full, human-readable address for this place.
+     * 
+ * + * string formatted_address = 9; + * + * @return The formattedAddress. + */ + public java.lang.String getFormattedAddress() { + java.lang.Object ref = formattedAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + formattedAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A full, human-readable address for this place.
+     * 
+ * + * string formatted_address = 9; + * + * @return The bytes for formattedAddress. + */ + public com.google.protobuf.ByteString getFormattedAddressBytes() { + java.lang.Object ref = formattedAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + formattedAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A full, human-readable address for this place.
+     * 
+ * + * string formatted_address = 9; + * + * @param value The formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + formattedAddress_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A full, human-readable address for this place.
+     * 
+ * + * string formatted_address = 9; + * + * @return This builder for chaining. + */ + public Builder clearFormattedAddress() { + formattedAddress_ = getDefaultInstance().getFormattedAddress(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A full, human-readable address for this place.
+     * 
+ * + * string formatted_address = 9; + * + * @param value The bytes for formattedAddress to set. + * @return This builder for chaining. + */ + public Builder setFormattedAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + formattedAddress_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List addressComponents_ = + java.util.Collections.emptyList(); + + private void ensureAddressComponentsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + addressComponents_ = + new java.util.ArrayList( + addressComponents_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.AddressComponent, + com.google.maps.places.v1.Place.AddressComponent.Builder, + com.google.maps.places.v1.Place.AddressComponentOrBuilder> + addressComponentsBuilder_; + + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public java.util.List + getAddressComponentsList() { + if (addressComponentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(addressComponents_); + } else { + return addressComponentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public int getAddressComponentsCount() { + if (addressComponentsBuilder_ == null) { + return addressComponents_.size(); + } else { + return addressComponentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public com.google.maps.places.v1.Place.AddressComponent getAddressComponents(int index) { + if (addressComponentsBuilder_ == null) { + return addressComponents_.get(index); + } else { + return addressComponentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder setAddressComponents( + int index, com.google.maps.places.v1.Place.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.set(index, value); + onChanged(); + } else { + addressComponentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder setAddressComponents( + int index, com.google.maps.places.v1.Place.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.set(index, builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder addAddressComponents(com.google.maps.places.v1.Place.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.add(value); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder addAddressComponents( + int index, com.google.maps.places.v1.Place.AddressComponent value) { + if (addressComponentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressComponentsIsMutable(); + addressComponents_.add(index, value); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder addAddressComponents( + com.google.maps.places.v1.Place.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder addAddressComponents( + int index, com.google.maps.places.v1.Place.AddressComponent.Builder builderForValue) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.add(index, builderForValue.build()); + onChanged(); + } else { + addressComponentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder addAllAddressComponents( + java.lang.Iterable values) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, addressComponents_); + onChanged(); + } else { + addressComponentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder clearAddressComponents() { + if (addressComponentsBuilder_ == null) { + addressComponents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + addressComponentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public Builder removeAddressComponents(int index) { + if (addressComponentsBuilder_ == null) { + ensureAddressComponentsIsMutable(); + addressComponents_.remove(index); + onChanged(); + } else { + addressComponentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public com.google.maps.places.v1.Place.AddressComponent.Builder getAddressComponentsBuilder( + int index) { + return getAddressComponentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOrBuilder( + int index) { + if (addressComponentsBuilder_ == null) { + return addressComponents_.get(index); + } else { + return addressComponentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public java.util.List + getAddressComponentsOrBuilderList() { + if (addressComponentsBuilder_ != null) { + return addressComponentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(addressComponents_); + } + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public com.google.maps.places.v1.Place.AddressComponent.Builder addAddressComponentsBuilder() { + return getAddressComponentsFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.AddressComponent.getDefaultInstance()); + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public com.google.maps.places.v1.Place.AddressComponent.Builder addAddressComponentsBuilder( + int index) { + return getAddressComponentsFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.AddressComponent.getDefaultInstance()); + } + /** + * + * + *
+     * Repeated components for each locality level.
+     * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + public java.util.List + getAddressComponentsBuilderList() { + return getAddressComponentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.AddressComponent, + com.google.maps.places.v1.Place.AddressComponent.Builder, + com.google.maps.places.v1.Place.AddressComponentOrBuilder> + getAddressComponentsFieldBuilder() { + if (addressComponentsBuilder_ == null) { + addressComponentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.AddressComponent, + com.google.maps.places.v1.Place.AddressComponent.Builder, + com.google.maps.places.v1.Place.AddressComponentOrBuilder>( + addressComponents_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + addressComponents_ = null; + } + return addressComponentsBuilder_; + } + + private com.google.maps.places.v1.Place.PlusCode plusCode_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.PlusCode, + com.google.maps.places.v1.Place.PlusCode.Builder, + com.google.maps.places.v1.Place.PlusCodeOrBuilder> + plusCodeBuilder_; + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return Whether the plusCode field is set. + */ + public boolean hasPlusCode() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return The plusCode. + */ + public com.google.maps.places.v1.Place.PlusCode getPlusCode() { + if (plusCodeBuilder_ == null) { + return plusCode_ == null + ? com.google.maps.places.v1.Place.PlusCode.getDefaultInstance() + : plusCode_; + } else { + return plusCodeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public Builder setPlusCode(com.google.maps.places.v1.Place.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plusCode_ = value; + } else { + plusCodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public Builder setPlusCode(com.google.maps.places.v1.Place.PlusCode.Builder builderForValue) { + if (plusCodeBuilder_ == null) { + plusCode_ = builderForValue.build(); + } else { + plusCodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public Builder mergePlusCode(com.google.maps.places.v1.Place.PlusCode value) { + if (plusCodeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && plusCode_ != null + && plusCode_ != com.google.maps.places.v1.Place.PlusCode.getDefaultInstance()) { + getPlusCodeBuilder().mergeFrom(value); + } else { + plusCode_ = value; + } + } else { + plusCodeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public Builder clearPlusCode() { + bitField0_ = (bitField0_ & ~0x00000080); + plusCode_ = null; + if (plusCodeBuilder_ != null) { + plusCodeBuilder_.dispose(); + plusCodeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public com.google.maps.places.v1.Place.PlusCode.Builder getPlusCodeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getPlusCodeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + public com.google.maps.places.v1.Place.PlusCodeOrBuilder getPlusCodeOrBuilder() { + if (plusCodeBuilder_ != null) { + return plusCodeBuilder_.getMessageOrBuilder(); + } else { + return plusCode_ == null + ? com.google.maps.places.v1.Place.PlusCode.getDefaultInstance() + : plusCode_; + } + } + /** + * + * + *
+     * Plus code of the place location lat/long.
+     * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.PlusCode, + com.google.maps.places.v1.Place.PlusCode.Builder, + com.google.maps.places.v1.Place.PlusCodeOrBuilder> + getPlusCodeFieldBuilder() { + if (plusCodeBuilder_ == null) { + plusCodeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.PlusCode, + com.google.maps.places.v1.Place.PlusCode.Builder, + com.google.maps.places.v1.Place.PlusCodeOrBuilder>( + getPlusCode(), getParentForChildren(), isClean()); + plusCode_ = null; + } + return plusCodeBuilder_; + } + + private com.google.type.LatLng location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + locationBuilder_; + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + * + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + * + * @return The location. + */ + public com.google.type.LatLng getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public Builder setLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public Builder setLocation(com.google.type.LatLng.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public Builder mergeLocation(com.google.type.LatLng value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && location_ != null + && location_ != com.google.type.LatLng.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000100); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public com.google.type.LatLng.Builder getLocationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + public com.google.type.LatLngOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? com.google.type.LatLng.getDefaultInstance() : location_; + } + } + /** + * + * + *
+     * The position of this place.
+     * 
+ * + * .google.type.LatLng location = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.geo.type.Viewport viewport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + viewportBuilder_; + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return Whether the viewport field is set. + */ + public boolean hasViewport() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return The viewport. + */ + public com.google.geo.type.Viewport getViewport() { + if (viewportBuilder_ == null) { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } else { + return viewportBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public Builder setViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewport_ = value; + } else { + viewportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public Builder setViewport(com.google.geo.type.Viewport.Builder builderForValue) { + if (viewportBuilder_ == null) { + viewport_ = builderForValue.build(); + } else { + viewportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public Builder mergeViewport(com.google.geo.type.Viewport value) { + if (viewportBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && viewport_ != null + && viewport_ != com.google.geo.type.Viewport.getDefaultInstance()) { + getViewportBuilder().mergeFrom(value); + } else { + viewport_ = value; + } + } else { + viewportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public Builder clearViewport() { + bitField0_ = (bitField0_ & ~0x00000200); + viewport_ = null; + if (viewportBuilder_ != null) { + viewportBuilder_.dispose(); + viewportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public com.google.geo.type.Viewport.Builder getViewportBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getViewportFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + public com.google.geo.type.ViewportOrBuilder getViewportOrBuilder() { + if (viewportBuilder_ != null) { + return viewportBuilder_.getMessageOrBuilder(); + } else { + return viewport_ == null ? com.google.geo.type.Viewport.getDefaultInstance() : viewport_; + } + } + /** + * + * + *
+     * A viewport suitable for displaying the place on an average-sized map.
+     * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + getViewportFieldBuilder() { + if (viewportBuilder_ == null) { + viewportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + getViewport(), getParentForChildren(), isClean()); + viewport_ = null; + } + return viewportBuilder_; + } + + private double rating_; + /** + * + * + *
+     * A rating between 1.0 and 5.0, based on user reviews of this place.
+     * 
+ * + * double rating = 14; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + /** + * + * + *
+     * A rating between 1.0 and 5.0, based on user reviews of this place.
+     * 
+ * + * double rating = 14; + * + * @param value The rating to set. + * @return This builder for chaining. + */ + public Builder setRating(double value) { + + rating_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * A rating between 1.0 and 5.0, based on user reviews of this place.
+     * 
+ * + * double rating = 14; + * + * @return This builder for chaining. + */ + public Builder clearRating() { + bitField0_ = (bitField0_ & ~0x00000400); + rating_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object googleMapsUri_ = ""; + /** + * + * + *
+     * A URL providing more information about this place.
+     * 
+ * + * string google_maps_uri = 15; + * + * @return The googleMapsUri. + */ + public java.lang.String getGoogleMapsUri() { + java.lang.Object ref = googleMapsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleMapsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A URL providing more information about this place.
+     * 
+ * + * string google_maps_uri = 15; + * + * @return The bytes for googleMapsUri. + */ + public com.google.protobuf.ByteString getGoogleMapsUriBytes() { + java.lang.Object ref = googleMapsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleMapsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A URL providing more information about this place.
+     * 
+ * + * string google_maps_uri = 15; + * + * @param value The googleMapsUri to set. + * @return This builder for chaining. + */ + public Builder setGoogleMapsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + googleMapsUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * A URL providing more information about this place.
+     * 
+ * + * string google_maps_uri = 15; + * + * @return This builder for chaining. + */ + public Builder clearGoogleMapsUri() { + googleMapsUri_ = getDefaultInstance().getGoogleMapsUri(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * A URL providing more information about this place.
+     * 
+ * + * string google_maps_uri = 15; + * + * @param value The bytes for googleMapsUri to set. + * @return This builder for chaining. + */ + public Builder setGoogleMapsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + googleMapsUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object websiteUri_ = ""; + /** + * + * + *
+     * 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; + * + * @return The websiteUri. + */ + public java.lang.String getWebsiteUri() { + java.lang.Object ref = websiteUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + websiteUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for websiteUri. + */ + public com.google.protobuf.ByteString getWebsiteUriBytes() { + java.lang.Object ref = websiteUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + websiteUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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; + * + * @param value The websiteUri to set. + * @return This builder for chaining. + */ + public Builder setWebsiteUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + websiteUri_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @return This builder for chaining. + */ + public Builder clearWebsiteUri() { + websiteUri_ = getDefaultInstance().getWebsiteUri(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @param value The bytes for websiteUri to set. + * @return This builder for chaining. + */ + public Builder setWebsiteUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + websiteUri_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.util.List reviews_ = + java.util.Collections.emptyList(); + + private void ensureReviewsIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + reviews_ = new java.util.ArrayList(reviews_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Review, + com.google.maps.places.v1.Place.Review.Builder, + com.google.maps.places.v1.Place.ReviewOrBuilder> + reviewsBuilder_; + + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public java.util.List getReviewsList() { + if (reviewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reviews_); + } else { + return reviewsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public int getReviewsCount() { + if (reviewsBuilder_ == null) { + return reviews_.size(); + } else { + return reviewsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public com.google.maps.places.v1.Place.Review getReviews(int index) { + if (reviewsBuilder_ == null) { + return reviews_.get(index); + } else { + return reviewsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder setReviews(int index, com.google.maps.places.v1.Place.Review value) { + if (reviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReviewsIsMutable(); + reviews_.set(index, value); + onChanged(); + } else { + reviewsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder setReviews( + int index, com.google.maps.places.v1.Place.Review.Builder builderForValue) { + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + reviews_.set(index, builderForValue.build()); + onChanged(); + } else { + reviewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder addReviews(com.google.maps.places.v1.Place.Review value) { + if (reviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReviewsIsMutable(); + reviews_.add(value); + onChanged(); + } else { + reviewsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder addReviews(int index, com.google.maps.places.v1.Place.Review value) { + if (reviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReviewsIsMutable(); + reviews_.add(index, value); + onChanged(); + } else { + reviewsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder addReviews(com.google.maps.places.v1.Place.Review.Builder builderForValue) { + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + reviews_.add(builderForValue.build()); + onChanged(); + } else { + reviewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder addReviews( + int index, com.google.maps.places.v1.Place.Review.Builder builderForValue) { + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + reviews_.add(index, builderForValue.build()); + onChanged(); + } else { + reviewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder addAllReviews( + java.lang.Iterable values) { + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reviews_); + onChanged(); + } else { + reviewsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder clearReviews() { + if (reviewsBuilder_ == null) { + reviews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + reviewsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public Builder removeReviews(int index) { + if (reviewsBuilder_ == null) { + ensureReviewsIsMutable(); + reviews_.remove(index); + onChanged(); + } else { + reviewsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public com.google.maps.places.v1.Place.Review.Builder getReviewsBuilder(int index) { + return getReviewsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public com.google.maps.places.v1.Place.ReviewOrBuilder getReviewsOrBuilder(int index) { + if (reviewsBuilder_ == null) { + return reviews_.get(index); + } else { + return reviewsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public java.util.List + getReviewsOrBuilderList() { + if (reviewsBuilder_ != null) { + return reviewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reviews_); + } + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public com.google.maps.places.v1.Place.Review.Builder addReviewsBuilder() { + return getReviewsFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.Review.getDefaultInstance()); + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public com.google.maps.places.v1.Place.Review.Builder addReviewsBuilder(int index) { + return getReviewsFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.Review.getDefaultInstance()); + } + /** + * + * + *
+     * List of reviews about this place.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + public java.util.List getReviewsBuilderList() { + return getReviewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Review, + com.google.maps.places.v1.Place.Review.Builder, + com.google.maps.places.v1.Place.ReviewOrBuilder> + getReviewsFieldBuilder() { + if (reviewsBuilder_ == null) { + reviewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Review, + com.google.maps.places.v1.Place.Review.Builder, + com.google.maps.places.v1.Place.ReviewOrBuilder>( + reviews_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); + reviews_ = null; + } + return reviewsBuilder_; + } + + private com.google.maps.places.v1.Place.OpeningHours openingHours_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + openingHoursBuilder_; + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return Whether the openingHours field is set. + */ + public boolean hasOpeningHours() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return The openingHours. + */ + public com.google.maps.places.v1.Place.OpeningHours getOpeningHours() { + if (openingHoursBuilder_ == null) { + return openingHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : openingHours_; + } else { + return openingHoursBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public Builder setOpeningHours(com.google.maps.places.v1.Place.OpeningHours value) { + if (openingHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + openingHours_ = value; + } else { + openingHoursBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public Builder setOpeningHours( + com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (openingHoursBuilder_ == null) { + openingHours_ = builderForValue.build(); + } else { + openingHoursBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public Builder mergeOpeningHours(com.google.maps.places.v1.Place.OpeningHours value) { + if (openingHoursBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && openingHours_ != null + && openingHours_ != com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()) { + getOpeningHoursBuilder().mergeFrom(value); + } else { + openingHours_ = value; + } + } else { + openingHoursBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public Builder clearOpeningHours() { + bitField0_ = (bitField0_ & ~0x00004000); + openingHours_ = null; + if (openingHoursBuilder_ != null) { + openingHoursBuilder_.dispose(); + openingHoursBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder getOpeningHoursBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getOpeningHoursFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getOpeningHoursOrBuilder() { + if (openingHoursBuilder_ != null) { + return openingHoursBuilder_.getMessageOrBuilder(); + } else { + return openingHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : openingHours_; + } + } + /** + * + * + *
+     * The regular hours of operation.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + getOpeningHoursFieldBuilder() { + if (openingHoursBuilder_ == null) { + openingHoursBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder>( + getOpeningHours(), getParentForChildren(), isClean()); + openingHours_ = null; + } + return openingHoursBuilder_; + } + + private int utcOffsetMinutes_; + /** + * + * + *
+     * 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.
+     * 
+ * + * int32 utc_offset_minutes = 22; + * + * @return The utcOffsetMinutes. + */ + @java.lang.Override + public int getUtcOffsetMinutes() { + return utcOffsetMinutes_; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * int32 utc_offset_minutes = 22; + * + * @param value The utcOffsetMinutes to set. + * @return This builder for chaining. + */ + public Builder setUtcOffsetMinutes(int value) { + + utcOffsetMinutes_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * int32 utc_offset_minutes = 22; + * + * @return This builder for chaining. + */ + public Builder clearUtcOffsetMinutes() { + bitField0_ = (bitField0_ & ~0x00008000); + utcOffsetMinutes_ = 0; + onChanged(); + return this; + } + + private java.lang.Object adrFormatAddress_ = ""; + /** + * + * + *
+     * The place's address in adr microformat: http://microformats.org/wiki/adr.
+     * 
+ * + * string adr_format_address = 24; + * + * @return The adrFormatAddress. + */ + public java.lang.String getAdrFormatAddress() { + java.lang.Object ref = adrFormatAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adrFormatAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The place's address in adr microformat: http://microformats.org/wiki/adr.
+     * 
+ * + * string adr_format_address = 24; + * + * @return The bytes for adrFormatAddress. + */ + public com.google.protobuf.ByteString getAdrFormatAddressBytes() { + java.lang.Object ref = adrFormatAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adrFormatAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The place's address in adr microformat: http://microformats.org/wiki/adr.
+     * 
+ * + * string adr_format_address = 24; + * + * @param value The adrFormatAddress to set. + * @return This builder for chaining. + */ + public Builder setAdrFormatAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adrFormatAddress_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * The place's address in adr microformat: http://microformats.org/wiki/adr.
+     * 
+ * + * string adr_format_address = 24; + * + * @return This builder for chaining. + */ + public Builder clearAdrFormatAddress() { + adrFormatAddress_ = getDefaultInstance().getAdrFormatAddress(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * + * + *
+     * The place's address in adr microformat: http://microformats.org/wiki/adr.
+     * 
+ * + * string adr_format_address = 24; + * + * @param value The bytes for adrFormatAddress to set. + * @return This builder for chaining. + */ + public Builder setAdrFormatAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adrFormatAddress_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private int businessStatus_ = 0; + /** + * + * + *
+     * The business status for the place.
+     * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The enum numeric value on the wire for businessStatus. + */ + @java.lang.Override + public int getBusinessStatusValue() { + return businessStatus_; + } + /** + * + * + *
+     * The business status for the place.
+     * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @param value The enum numeric value on the wire for businessStatus to set. + * @return This builder for chaining. + */ + public Builder setBusinessStatusValue(int value) { + businessStatus_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * The business status for the place.
+     * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The businessStatus. + */ + @java.lang.Override + public com.google.maps.places.v1.Place.BusinessStatus getBusinessStatus() { + com.google.maps.places.v1.Place.BusinessStatus result = + com.google.maps.places.v1.Place.BusinessStatus.forNumber(businessStatus_); + return result == null ? com.google.maps.places.v1.Place.BusinessStatus.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The business status for the place.
+     * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @param value The businessStatus to set. + * @return This builder for chaining. + */ + public Builder setBusinessStatus(com.google.maps.places.v1.Place.BusinessStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + businessStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The business status for the place.
+     * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return This builder for chaining. + */ + public Builder clearBusinessStatus() { + bitField0_ = (bitField0_ & ~0x00020000); + businessStatus_ = 0; + onChanged(); + return this; + } + + private int priceLevel_ = 0; + /** + * + * + *
+     * Price level of the place.
+     * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The enum numeric value on the wire for priceLevel. + */ + @java.lang.Override + public int getPriceLevelValue() { + return priceLevel_; + } + /** + * + * + *
+     * Price level of the place.
+     * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @param value The enum numeric value on the wire for priceLevel to set. + * @return This builder for chaining. + */ + public Builder setPriceLevelValue(int value) { + priceLevel_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Price level of the place.
+     * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The priceLevel. + */ + @java.lang.Override + public com.google.maps.places.v1.PriceLevel getPriceLevel() { + com.google.maps.places.v1.PriceLevel result = + com.google.maps.places.v1.PriceLevel.forNumber(priceLevel_); + return result == null ? com.google.maps.places.v1.PriceLevel.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Price level of the place.
+     * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @param value The priceLevel to set. + * @return This builder for chaining. + */ + public Builder setPriceLevel(com.google.maps.places.v1.PriceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + priceLevel_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Price level of the place.
+     * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return This builder for chaining. + */ + public Builder clearPriceLevel() { + bitField0_ = (bitField0_ & ~0x00040000); + priceLevel_ = 0; + onChanged(); + return this; + } + + private java.util.List attributions_ = + java.util.Collections.emptyList(); + + private void ensureAttributionsIsMutable() { + if (!((bitField0_ & 0x00080000) != 0)) { + attributions_ = + new java.util.ArrayList(attributions_); + bitField0_ |= 0x00080000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Attribution, + com.google.maps.places.v1.Place.Attribution.Builder, + com.google.maps.places.v1.Place.AttributionOrBuilder> + attributionsBuilder_; + + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public java.util.List getAttributionsList() { + if (attributionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributions_); + } else { + return attributionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public int getAttributionsCount() { + if (attributionsBuilder_ == null) { + return attributions_.size(); + } else { + return attributionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public com.google.maps.places.v1.Place.Attribution getAttributions(int index) { + if (attributionsBuilder_ == null) { + return attributions_.get(index); + } else { + return attributionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder setAttributions(int index, com.google.maps.places.v1.Place.Attribution value) { + if (attributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributionsIsMutable(); + attributions_.set(index, value); + onChanged(); + } else { + attributionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder setAttributions( + int index, com.google.maps.places.v1.Place.Attribution.Builder builderForValue) { + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + attributions_.set(index, builderForValue.build()); + onChanged(); + } else { + attributionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder addAttributions(com.google.maps.places.v1.Place.Attribution value) { + if (attributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributionsIsMutable(); + attributions_.add(value); + onChanged(); + } else { + attributionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder addAttributions(int index, com.google.maps.places.v1.Place.Attribution value) { + if (attributionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributionsIsMutable(); + attributions_.add(index, value); + onChanged(); + } else { + attributionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder addAttributions( + com.google.maps.places.v1.Place.Attribution.Builder builderForValue) { + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + attributions_.add(builderForValue.build()); + onChanged(); + } else { + attributionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder addAttributions( + int index, com.google.maps.places.v1.Place.Attribution.Builder builderForValue) { + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + attributions_.add(index, builderForValue.build()); + onChanged(); + } else { + attributionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder addAllAttributions( + java.lang.Iterable values) { + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributions_); + onChanged(); + } else { + attributionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder clearAttributions() { + if (attributionsBuilder_ == null) { + attributions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + } else { + attributionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public Builder removeAttributions(int index) { + if (attributionsBuilder_ == null) { + ensureAttributionsIsMutable(); + attributions_.remove(index); + onChanged(); + } else { + attributionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public com.google.maps.places.v1.Place.Attribution.Builder getAttributionsBuilder(int index) { + return getAttributionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public com.google.maps.places.v1.Place.AttributionOrBuilder getAttributionsOrBuilder( + int index) { + if (attributionsBuilder_ == null) { + return attributions_.get(index); + } else { + return attributionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public java.util.List + getAttributionsOrBuilderList() { + if (attributionsBuilder_ != null) { + return attributionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributions_); + } + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public com.google.maps.places.v1.Place.Attribution.Builder addAttributionsBuilder() { + return getAttributionsFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.Attribution.getDefaultInstance()); + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public com.google.maps.places.v1.Place.Attribution.Builder addAttributionsBuilder(int index) { + return getAttributionsFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.Attribution.getDefaultInstance()); + } + /** + * + * + *
+     * A set of data provider that must be shown with this result.
+     * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + public java.util.List + getAttributionsBuilderList() { + return getAttributionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Attribution, + com.google.maps.places.v1.Place.Attribution.Builder, + com.google.maps.places.v1.Place.AttributionOrBuilder> + getAttributionsFieldBuilder() { + if (attributionsBuilder_ == null) { + attributionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.Attribution, + com.google.maps.places.v1.Place.Attribution.Builder, + com.google.maps.places.v1.Place.AttributionOrBuilder>( + attributions_, ((bitField0_ & 0x00080000) != 0), getParentForChildren(), isClean()); + attributions_ = null; + } + return attributionsBuilder_; + } + + private int userRatingCount_; + /** + * + * + *
+     * The total number of reviews (with or without text) for this place.
+     * 
+ * + * int32 user_rating_count = 28; + * + * @return The userRatingCount. + */ + @java.lang.Override + public int getUserRatingCount() { + return userRatingCount_; + } + /** + * + * + *
+     * The total number of reviews (with or without text) for this place.
+     * 
+ * + * int32 user_rating_count = 28; + * + * @param value The userRatingCount to set. + * @return This builder for chaining. + */ + public Builder setUserRatingCount(int value) { + + userRatingCount_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of reviews (with or without text) for this place.
+     * 
+ * + * int32 user_rating_count = 28; + * + * @return This builder for chaining. + */ + public Builder clearUserRatingCount() { + bitField0_ = (bitField0_ & ~0x00100000); + userRatingCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object iconMaskBaseUri_ = ""; + /** + * + * + *
+     * A truncated URL to an v2 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; + * + * @return The iconMaskBaseUri. + */ + public java.lang.String getIconMaskBaseUri() { + java.lang.Object ref = iconMaskBaseUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iconMaskBaseUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A truncated URL to an v2 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; + * + * @return The bytes for iconMaskBaseUri. + */ + public com.google.protobuf.ByteString getIconMaskBaseUriBytes() { + java.lang.Object ref = iconMaskBaseUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconMaskBaseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A truncated URL to an v2 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; + * + * @param value The iconMaskBaseUri to set. + * @return This builder for chaining. + */ + public Builder setIconMaskBaseUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iconMaskBaseUri_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * A truncated URL to an v2 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; + * + * @return This builder for chaining. + */ + public Builder clearIconMaskBaseUri() { + iconMaskBaseUri_ = getDefaultInstance().getIconMaskBaseUri(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * + * + *
+     * A truncated URL to an v2 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; + * + * @param value The bytes for iconMaskBaseUri to set. + * @return This builder for chaining. + */ + public Builder setIconMaskBaseUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iconMaskBaseUri_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private java.lang.Object iconBackgroundColor_ = ""; + /** + * + * + *
+     * Background color for icon_mask in hex format, e.g. #909CE1.
+     * 
+ * + * string icon_background_color = 30; + * + * @return The iconBackgroundColor. + */ + public java.lang.String getIconBackgroundColor() { + java.lang.Object ref = iconBackgroundColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iconBackgroundColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Background color for icon_mask in hex format, e.g. #909CE1.
+     * 
+ * + * string icon_background_color = 30; + * + * @return The bytes for iconBackgroundColor. + */ + public com.google.protobuf.ByteString getIconBackgroundColorBytes() { + java.lang.Object ref = iconBackgroundColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconBackgroundColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Background color for icon_mask in hex format, e.g. #909CE1.
+     * 
+ * + * string icon_background_color = 30; + * + * @param value The iconBackgroundColor to set. + * @return This builder for chaining. + */ + public Builder setIconBackgroundColor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iconBackgroundColor_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * + * + *
+     * Background color for icon_mask in hex format, e.g. #909CE1.
+     * 
+ * + * string icon_background_color = 30; + * + * @return This builder for chaining. + */ + public Builder clearIconBackgroundColor() { + iconBackgroundColor_ = getDefaultInstance().getIconBackgroundColor(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + * + * + *
+     * Background color for icon_mask in hex format, e.g. #909CE1.
+     * 
+ * + * string icon_background_color = 30; + * + * @param value The bytes for iconBackgroundColor to set. + * @return This builder for chaining. + */ + public Builder setIconBackgroundColorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iconBackgroundColor_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private boolean takeout_; + /** + * + * + *
+     * Specifies if the business supports takeout.
+     * 
+ * + * optional bool takeout = 33; + * + * @return Whether the takeout field is set. + */ + @java.lang.Override + public boolean hasTakeout() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * + * + *
+     * Specifies if the business supports takeout.
+     * 
+ * + * optional bool takeout = 33; + * + * @return The takeout. + */ + @java.lang.Override + public boolean getTakeout() { + return takeout_; + } + /** + * + * + *
+     * Specifies if the business supports takeout.
+     * 
+ * + * optional bool takeout = 33; + * + * @param value The takeout to set. + * @return This builder for chaining. + */ + public Builder setTakeout(boolean value) { + + takeout_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the business supports takeout.
+     * 
+ * + * optional bool takeout = 33; + * + * @return This builder for chaining. + */ + public Builder clearTakeout() { + bitField0_ = (bitField0_ & ~0x00800000); + takeout_ = false; + onChanged(); + return this; + } + + private boolean delivery_; + /** + * + * + *
+     * Specifies if the business supports delivery.
+     * 
+ * + * optional bool delivery = 34; + * + * @return Whether the delivery field is set. + */ + @java.lang.Override + public boolean hasDelivery() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * + * + *
+     * Specifies if the business supports delivery.
+     * 
+ * + * optional bool delivery = 34; + * + * @return The delivery. + */ + @java.lang.Override + public boolean getDelivery() { + return delivery_; + } + /** + * + * + *
+     * Specifies if the business supports delivery.
+     * 
+ * + * optional bool delivery = 34; + * + * @param value The delivery to set. + * @return This builder for chaining. + */ + public Builder setDelivery(boolean value) { + + delivery_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the business supports delivery.
+     * 
+ * + * optional bool delivery = 34; + * + * @return This builder for chaining. + */ + public Builder clearDelivery() { + bitField0_ = (bitField0_ & ~0x01000000); + delivery_ = false; + onChanged(); + return this; + } + + private boolean dineIn_; + /** + * + * + *
+     * Specifies if the business supports indoor or outdoor seating options.
+     * 
+ * + * optional bool dine_in = 35; + * + * @return Whether the dineIn field is set. + */ + @java.lang.Override + public boolean hasDineIn() { + return ((bitField0_ & 0x02000000) != 0); + } + /** + * + * + *
+     * Specifies if the business supports indoor or outdoor seating options.
+     * 
+ * + * optional bool dine_in = 35; + * + * @return The dineIn. + */ + @java.lang.Override + public boolean getDineIn() { + return dineIn_; + } + /** + * + * + *
+     * Specifies if the business supports indoor or outdoor seating options.
+     * 
+ * + * optional bool dine_in = 35; + * + * @param value The dineIn to set. + * @return This builder for chaining. + */ + public Builder setDineIn(boolean value) { + + dineIn_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the business supports indoor or outdoor seating options.
+     * 
+ * + * optional bool dine_in = 35; + * + * @return This builder for chaining. + */ + public Builder clearDineIn() { + bitField0_ = (bitField0_ & ~0x02000000); + dineIn_ = false; + onChanged(); + return this; + } + + private boolean curbsidePickup_; + /** + * + * + *
+     * Specifies if the business supports curbside pickup.
+     * 
+ * + * optional bool curbside_pickup = 36; + * + * @return Whether the curbsidePickup field is set. + */ + @java.lang.Override + public boolean hasCurbsidePickup() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Specifies if the business supports curbside pickup.
+     * 
+ * + * optional bool curbside_pickup = 36; + * + * @return The curbsidePickup. + */ + @java.lang.Override + public boolean getCurbsidePickup() { + return curbsidePickup_; + } + /** + * + * + *
+     * Specifies if the business supports curbside pickup.
+     * 
+ * + * optional bool curbside_pickup = 36; + * + * @param value The curbsidePickup to set. + * @return This builder for chaining. + */ + public Builder setCurbsidePickup(boolean value) { + + curbsidePickup_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the business supports curbside pickup.
+     * 
+ * + * optional bool curbside_pickup = 36; + * + * @return This builder for chaining. + */ + public Builder clearCurbsidePickup() { + bitField0_ = (bitField0_ & ~0x04000000); + curbsidePickup_ = false; + onChanged(); + return this; + } + + private boolean wheelchairAccessibleEntrance_; + /** + * + * + *
+     * Specifies if the place has an entrance that is wheelchair-accessible.
+     * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return Whether the wheelchairAccessibleEntrance field is set. + */ + @java.lang.Override + public boolean hasWheelchairAccessibleEntrance() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * + * + *
+     * Specifies if the place has an entrance that is wheelchair-accessible.
+     * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return The wheelchairAccessibleEntrance. + */ + @java.lang.Override + public boolean getWheelchairAccessibleEntrance() { + return wheelchairAccessibleEntrance_; + } + /** + * + * + *
+     * Specifies if the place has an entrance that is wheelchair-accessible.
+     * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @param value The wheelchairAccessibleEntrance to set. + * @return This builder for chaining. + */ + public Builder setWheelchairAccessibleEntrance(boolean value) { + + wheelchairAccessibleEntrance_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place has an entrance that is wheelchair-accessible.
+     * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return This builder for chaining. + */ + public Builder clearWheelchairAccessibleEntrance() { + bitField0_ = (bitField0_ & ~0x08000000); + wheelchairAccessibleEntrance_ = false; + onChanged(); + return this; + } + + private boolean reservable_; + /** + * + * + *
+     * Specifies if the place supports reservations.
+     * 
+ * + * optional bool reservable = 38; + * + * @return Whether the reservable field is set. + */ + @java.lang.Override + public boolean hasReservable() { + return ((bitField0_ & 0x10000000) != 0); + } + /** + * + * + *
+     * Specifies if the place supports reservations.
+     * 
+ * + * optional bool reservable = 38; + * + * @return The reservable. + */ + @java.lang.Override + public boolean getReservable() { + return reservable_; + } + /** + * + * + *
+     * Specifies if the place supports reservations.
+     * 
+ * + * optional bool reservable = 38; + * + * @param value The reservable to set. + * @return This builder for chaining. + */ + public Builder setReservable(boolean value) { + + reservable_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place supports reservations.
+     * 
+ * + * optional bool reservable = 38; + * + * @return This builder for chaining. + */ + public Builder clearReservable() { + bitField0_ = (bitField0_ & ~0x10000000); + reservable_ = false; + onChanged(); + return this; + } + + private boolean servesBreakfast_; + /** + * + * + *
+     * Specifies if the place serves breakfast.
+     * 
+ * + * optional bool serves_breakfast = 39; + * + * @return Whether the servesBreakfast field is set. + */ + @java.lang.Override + public boolean hasServesBreakfast() { + return ((bitField0_ & 0x20000000) != 0); + } + /** + * + * + *
+     * Specifies if the place serves breakfast.
+     * 
+ * + * optional bool serves_breakfast = 39; + * + * @return The servesBreakfast. + */ + @java.lang.Override + public boolean getServesBreakfast() { + return servesBreakfast_; + } + /** + * + * + *
+     * Specifies if the place serves breakfast.
+     * 
+ * + * optional bool serves_breakfast = 39; + * + * @param value The servesBreakfast to set. + * @return This builder for chaining. + */ + public Builder setServesBreakfast(boolean value) { + + servesBreakfast_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves breakfast.
+     * 
+ * + * optional bool serves_breakfast = 39; + * + * @return This builder for chaining. + */ + public Builder clearServesBreakfast() { + bitField0_ = (bitField0_ & ~0x20000000); + servesBreakfast_ = false; + onChanged(); + return this; + } + + private boolean servesLunch_; + /** + * + * + *
+     * Specifies if the place serves lunch.
+     * 
+ * + * optional bool serves_lunch = 40; + * + * @return Whether the servesLunch field is set. + */ + @java.lang.Override + public boolean hasServesLunch() { + return ((bitField0_ & 0x40000000) != 0); + } + /** + * + * + *
+     * Specifies if the place serves lunch.
+     * 
+ * + * optional bool serves_lunch = 40; + * + * @return The servesLunch. + */ + @java.lang.Override + public boolean getServesLunch() { + return servesLunch_; + } + /** + * + * + *
+     * Specifies if the place serves lunch.
+     * 
+ * + * optional bool serves_lunch = 40; + * + * @param value The servesLunch to set. + * @return This builder for chaining. + */ + public Builder setServesLunch(boolean value) { + + servesLunch_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves lunch.
+     * 
+ * + * optional bool serves_lunch = 40; + * + * @return This builder for chaining. + */ + public Builder clearServesLunch() { + bitField0_ = (bitField0_ & ~0x40000000); + servesLunch_ = false; + onChanged(); + return this; + } + + private boolean servesDinner_; + /** + * + * + *
+     * Specifies if the place serves dinner.
+     * 
+ * + * optional bool serves_dinner = 41; + * + * @return Whether the servesDinner field is set. + */ + @java.lang.Override + public boolean hasServesDinner() { + return ((bitField0_ & 0x80000000) != 0); + } + /** + * + * + *
+     * Specifies if the place serves dinner.
+     * 
+ * + * optional bool serves_dinner = 41; + * + * @return The servesDinner. + */ + @java.lang.Override + public boolean getServesDinner() { + return servesDinner_; + } + /** + * + * + *
+     * Specifies if the place serves dinner.
+     * 
+ * + * optional bool serves_dinner = 41; + * + * @param value The servesDinner to set. + * @return This builder for chaining. + */ + public Builder setServesDinner(boolean value) { + + servesDinner_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves dinner.
+     * 
+ * + * optional bool serves_dinner = 41; + * + * @return This builder for chaining. + */ + public Builder clearServesDinner() { + bitField0_ = (bitField0_ & ~0x80000000); + servesDinner_ = false; + onChanged(); + return this; + } + + private boolean servesBeer_; + /** + * + * + *
+     * Specifies if the place serves beer.
+     * 
+ * + * optional bool serves_beer = 42; + * + * @return Whether the servesBeer field is set. + */ + @java.lang.Override + public boolean hasServesBeer() { + return ((bitField1_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Specifies if the place serves beer.
+     * 
+ * + * optional bool serves_beer = 42; + * + * @return The servesBeer. + */ + @java.lang.Override + public boolean getServesBeer() { + return servesBeer_; + } + /** + * + * + *
+     * Specifies if the place serves beer.
+     * 
+ * + * optional bool serves_beer = 42; + * + * @param value The servesBeer to set. + * @return This builder for chaining. + */ + public Builder setServesBeer(boolean value) { + + servesBeer_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves beer.
+     * 
+ * + * optional bool serves_beer = 42; + * + * @return This builder for chaining. + */ + public Builder clearServesBeer() { + bitField1_ = (bitField1_ & ~0x00000001); + servesBeer_ = false; + onChanged(); + return this; + } + + private boolean servesWine_; + /** + * + * + *
+     * Specifies if the place serves wine.
+     * 
+ * + * optional bool serves_wine = 43; + * + * @return Whether the servesWine field is set. + */ + @java.lang.Override + public boolean hasServesWine() { + return ((bitField1_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Specifies if the place serves wine.
+     * 
+ * + * optional bool serves_wine = 43; + * + * @return The servesWine. + */ + @java.lang.Override + public boolean getServesWine() { + return servesWine_; + } + /** + * + * + *
+     * Specifies if the place serves wine.
+     * 
+ * + * optional bool serves_wine = 43; + * + * @param value The servesWine to set. + * @return This builder for chaining. + */ + public Builder setServesWine(boolean value) { + + servesWine_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves wine.
+     * 
+ * + * optional bool serves_wine = 43; + * + * @return This builder for chaining. + */ + public Builder clearServesWine() { + bitField1_ = (bitField1_ & ~0x00000002); + servesWine_ = false; + onChanged(); + return this; + } + + private boolean servesBrunch_; + /** + * + * + *
+     * Specifies if the place serves brunch.
+     * 
+ * + * optional bool serves_brunch = 44; + * + * @return Whether the servesBrunch field is set. + */ + @java.lang.Override + public boolean hasServesBrunch() { + return ((bitField1_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Specifies if the place serves brunch.
+     * 
+ * + * optional bool serves_brunch = 44; + * + * @return The servesBrunch. + */ + @java.lang.Override + public boolean getServesBrunch() { + return servesBrunch_; + } + /** + * + * + *
+     * Specifies if the place serves brunch.
+     * 
+ * + * optional bool serves_brunch = 44; + * + * @param value The servesBrunch to set. + * @return This builder for chaining. + */ + public Builder setServesBrunch(boolean value) { + + servesBrunch_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves brunch.
+     * 
+ * + * optional bool serves_brunch = 44; + * + * @return This builder for chaining. + */ + public Builder clearServesBrunch() { + bitField1_ = (bitField1_ & ~0x00000004); + servesBrunch_ = false; + onChanged(); + return this; + } + + private boolean servesVegetarianFood_; + /** + * + * + *
+     * Specifies if the place serves vegetarian food.
+     * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return Whether the servesVegetarianFood field is set. + */ + @java.lang.Override + public boolean hasServesVegetarianFood() { + return ((bitField1_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Specifies if the place serves vegetarian food.
+     * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return The servesVegetarianFood. + */ + @java.lang.Override + public boolean getServesVegetarianFood() { + return servesVegetarianFood_; + } + /** + * + * + *
+     * Specifies if the place serves vegetarian food.
+     * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @param value The servesVegetarianFood to set. + * @return This builder for chaining. + */ + public Builder setServesVegetarianFood(boolean value) { + + servesVegetarianFood_ = value; + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies if the place serves vegetarian food.
+     * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return This builder for chaining. + */ + public Builder clearServesVegetarianFood() { + bitField1_ = (bitField1_ & ~0x00000008); + servesVegetarianFood_ = false; + onChanged(); + return this; + } + + private com.google.maps.places.v1.Place.OpeningHours currentOpeningHours_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + currentOpeningHoursBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return Whether the currentOpeningHours field is set. + */ + public boolean hasCurrentOpeningHours() { + return ((bitField1_ & 0x00000010) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return The currentOpeningHours. + */ + public com.google.maps.places.v1.Place.OpeningHours getCurrentOpeningHours() { + if (currentOpeningHoursBuilder_ == null) { + return currentOpeningHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : currentOpeningHours_; + } else { + return currentOpeningHoursBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public Builder setCurrentOpeningHours(com.google.maps.places.v1.Place.OpeningHours value) { + if (currentOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentOpeningHours_ = value; + } else { + currentOpeningHoursBuilder_.setMessage(value); + } + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public Builder setCurrentOpeningHours( + com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (currentOpeningHoursBuilder_ == null) { + currentOpeningHours_ = builderForValue.build(); + } else { + currentOpeningHoursBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public Builder mergeCurrentOpeningHours(com.google.maps.places.v1.Place.OpeningHours value) { + if (currentOpeningHoursBuilder_ == null) { + if (((bitField1_ & 0x00000010) != 0) + && currentOpeningHours_ != null + && currentOpeningHours_ + != com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()) { + getCurrentOpeningHoursBuilder().mergeFrom(value); + } else { + currentOpeningHours_ = value; + } + } else { + currentOpeningHoursBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public Builder clearCurrentOpeningHours() { + bitField1_ = (bitField1_ & ~0x00000010); + currentOpeningHours_ = null; + if (currentOpeningHoursBuilder_ != null) { + currentOpeningHoursBuilder_.dispose(); + currentOpeningHoursBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder getCurrentOpeningHoursBuilder() { + bitField1_ |= 0x00000010; + onChanged(); + return getCurrentOpeningHoursFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getCurrentOpeningHoursOrBuilder() { + if (currentOpeningHoursBuilder_ != null) { + return currentOpeningHoursBuilder_.getMessageOrBuilder(); + } else { + return currentOpeningHours_ == null + ? com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance() + : currentOpeningHours_; + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + getCurrentOpeningHoursFieldBuilder() { + if (currentOpeningHoursBuilder_ == null) { + currentOpeningHoursBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder>( + getCurrentOpeningHours(), getParentForChildren(), isClean()); + currentOpeningHours_ = null; + } + return currentOpeningHoursBuilder_; + } + + private java.util.List + currentSecondaryOpeningHours_ = java.util.Collections.emptyList(); + + private void ensureCurrentSecondaryOpeningHoursIsMutable() { + if (!((bitField1_ & 0x00000020) != 0)) { + currentSecondaryOpeningHours_ = + new java.util.ArrayList( + currentSecondaryOpeningHours_); + bitField1_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + currentSecondaryOpeningHoursBuilder_; + + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public java.util.List + getCurrentSecondaryOpeningHoursList() { + if (currentSecondaryOpeningHoursBuilder_ == null) { + return java.util.Collections.unmodifiableList(currentSecondaryOpeningHours_); + } else { + return currentSecondaryOpeningHoursBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public int getCurrentSecondaryOpeningHoursCount() { + if (currentSecondaryOpeningHoursBuilder_ == null) { + return currentSecondaryOpeningHours_.size(); + } else { + return currentSecondaryOpeningHoursBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public com.google.maps.places.v1.Place.OpeningHours getCurrentSecondaryOpeningHours(int index) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + return currentSecondaryOpeningHours_.get(index); + } else { + return currentSecondaryOpeningHoursBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder setCurrentSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours value) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.set(index, value); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder setCurrentSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.set(index, builderForValue.build()); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder addCurrentSecondaryOpeningHours( + com.google.maps.places.v1.Place.OpeningHours value) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.add(value); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder addCurrentSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours value) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.add(index, value); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder addCurrentSecondaryOpeningHours( + com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.add(builderForValue.build()); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder addCurrentSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.add(index, builderForValue.build()); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder addAllCurrentSecondaryOpeningHours( + java.lang.Iterable values) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, currentSecondaryOpeningHours_); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder clearCurrentSecondaryOpeningHours() { + if (currentSecondaryOpeningHoursBuilder_ == null) { + currentSecondaryOpeningHours_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000020); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public Builder removeCurrentSecondaryOpeningHours(int index) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + ensureCurrentSecondaryOpeningHoursIsMutable(); + currentSecondaryOpeningHours_.remove(index); + onChanged(); + } else { + currentSecondaryOpeningHoursBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder + getCurrentSecondaryOpeningHoursBuilder(int index) { + return getCurrentSecondaryOpeningHoursFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder + getCurrentSecondaryOpeningHoursOrBuilder(int index) { + if (currentSecondaryOpeningHoursBuilder_ == null) { + return currentSecondaryOpeningHours_.get(index); + } else { + return currentSecondaryOpeningHoursBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public java.util.List + getCurrentSecondaryOpeningHoursOrBuilderList() { + if (currentSecondaryOpeningHoursBuilder_ != null) { + return currentSecondaryOpeningHoursBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(currentSecondaryOpeningHours_); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder + addCurrentSecondaryOpeningHoursBuilder() { + return getCurrentSecondaryOpeningHoursFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder + addCurrentSecondaryOpeningHoursBuilder(int index) { + return getCurrentSecondaryOpeningHoursFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + public java.util.List + getCurrentSecondaryOpeningHoursBuilderList() { + return getCurrentSecondaryOpeningHoursFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + getCurrentSecondaryOpeningHoursFieldBuilder() { + if (currentSecondaryOpeningHoursBuilder_ == null) { + currentSecondaryOpeningHoursBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder>( + currentSecondaryOpeningHours_, + ((bitField1_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + currentSecondaryOpeningHours_ = null; + } + return currentSecondaryOpeningHoursBuilder_; + } + + private java.util.List secondaryOpeningHours_ = + java.util.Collections.emptyList(); + + private void ensureSecondaryOpeningHoursIsMutable() { + if (!((bitField1_ & 0x00000040) != 0)) { + secondaryOpeningHours_ = + new java.util.ArrayList( + secondaryOpeningHours_); + bitField1_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + secondaryOpeningHoursBuilder_; + + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public java.util.List + getSecondaryOpeningHoursList() { + if (secondaryOpeningHoursBuilder_ == null) { + return java.util.Collections.unmodifiableList(secondaryOpeningHours_); + } else { + return secondaryOpeningHoursBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public int getSecondaryOpeningHoursCount() { + if (secondaryOpeningHoursBuilder_ == null) { + return secondaryOpeningHours_.size(); + } else { + return secondaryOpeningHoursBuilder_.getCount(); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public com.google.maps.places.v1.Place.OpeningHours getSecondaryOpeningHours(int index) { + if (secondaryOpeningHoursBuilder_ == null) { + return secondaryOpeningHours_.get(index); + } else { + return secondaryOpeningHoursBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder setSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours value) { + if (secondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.set(index, value); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder setSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.set(index, builderForValue.build()); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder addSecondaryOpeningHours(com.google.maps.places.v1.Place.OpeningHours value) { + if (secondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.add(value); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder addSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours value) { + if (secondaryOpeningHoursBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.add(index, value); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder addSecondaryOpeningHours( + com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.add(builderForValue.build()); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder addSecondaryOpeningHours( + int index, com.google.maps.places.v1.Place.OpeningHours.Builder builderForValue) { + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.add(index, builderForValue.build()); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder addAllSecondaryOpeningHours( + java.lang.Iterable values) { + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secondaryOpeningHours_); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder clearSecondaryOpeningHours() { + if (secondaryOpeningHoursBuilder_ == null) { + secondaryOpeningHours_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000040); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public Builder removeSecondaryOpeningHours(int index) { + if (secondaryOpeningHoursBuilder_ == null) { + ensureSecondaryOpeningHoursIsMutable(); + secondaryOpeningHours_.remove(index); + onChanged(); + } else { + secondaryOpeningHoursBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder getSecondaryOpeningHoursBuilder( + int index) { + return getSecondaryOpeningHoursFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public com.google.maps.places.v1.Place.OpeningHoursOrBuilder getSecondaryOpeningHoursOrBuilder( + int index) { + if (secondaryOpeningHoursBuilder_ == null) { + return secondaryOpeningHours_.get(index); + } else { + return secondaryOpeningHoursBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public java.util.List + getSecondaryOpeningHoursOrBuilderList() { + if (secondaryOpeningHoursBuilder_ != null) { + return secondaryOpeningHoursBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(secondaryOpeningHours_); + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder addSecondaryOpeningHoursBuilder() { + return getSecondaryOpeningHoursFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public com.google.maps.places.v1.Place.OpeningHours.Builder addSecondaryOpeningHoursBuilder( + int index) { + return getSecondaryOpeningHoursFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.OpeningHours.getDefaultInstance()); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + public java.util.List + getSecondaryOpeningHoursBuilderList() { + return getSecondaryOpeningHoursFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder> + getSecondaryOpeningHoursFieldBuilder() { + if (secondaryOpeningHoursBuilder_ == null) { + secondaryOpeningHoursBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place.OpeningHours, + com.google.maps.places.v1.Place.OpeningHours.Builder, + com.google.maps.places.v1.Place.OpeningHoursOrBuilder>( + secondaryOpeningHours_, + ((bitField1_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + secondaryOpeningHours_ = null; + } + return secondaryOpeningHoursBuilder_; + } + + private com.google.maps.places.v1.Place.EditorialSummary editorialSummary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.EditorialSummary, + com.google.maps.places.v1.Place.EditorialSummary.Builder, + com.google.maps.places.v1.Place.EditorialSummaryOrBuilder> + editorialSummaryBuilder_; + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return Whether the editorialSummary field is set. + */ + public boolean hasEditorialSummary() { + return ((bitField1_ & 0x00000080) != 0); + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return The editorialSummary. + */ + public com.google.maps.places.v1.Place.EditorialSummary getEditorialSummary() { + if (editorialSummaryBuilder_ == null) { + return editorialSummary_ == null + ? com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance() + : editorialSummary_; + } else { + return editorialSummaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public Builder setEditorialSummary(com.google.maps.places.v1.Place.EditorialSummary value) { + if (editorialSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + editorialSummary_ = value; + } else { + editorialSummaryBuilder_.setMessage(value); + } + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public Builder setEditorialSummary( + com.google.maps.places.v1.Place.EditorialSummary.Builder builderForValue) { + if (editorialSummaryBuilder_ == null) { + editorialSummary_ = builderForValue.build(); + } else { + editorialSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public Builder mergeEditorialSummary(com.google.maps.places.v1.Place.EditorialSummary value) { + if (editorialSummaryBuilder_ == null) { + if (((bitField1_ & 0x00000080) != 0) + && editorialSummary_ != null + && editorialSummary_ + != com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance()) { + getEditorialSummaryBuilder().mergeFrom(value); + } else { + editorialSummary_ = value; + } + } else { + editorialSummaryBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public Builder clearEditorialSummary() { + bitField1_ = (bitField1_ & ~0x00000080); + editorialSummary_ = null; + if (editorialSummaryBuilder_ != null) { + editorialSummaryBuilder_.dispose(); + editorialSummaryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public com.google.maps.places.v1.Place.EditorialSummary.Builder getEditorialSummaryBuilder() { + bitField1_ |= 0x00000080; + onChanged(); + return getEditorialSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + public com.google.maps.places.v1.Place.EditorialSummaryOrBuilder + getEditorialSummaryOrBuilder() { + if (editorialSummaryBuilder_ != null) { + return editorialSummaryBuilder_.getMessageOrBuilder(); + } else { + return editorialSummary_ == null + ? com.google.maps.places.v1.Place.EditorialSummary.getDefaultInstance() + : editorialSummary_; + } + } + /** + * + * + *
+     * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.EditorialSummary, + com.google.maps.places.v1.Place.EditorialSummary.Builder, + com.google.maps.places.v1.Place.EditorialSummaryOrBuilder> + getEditorialSummaryFieldBuilder() { + if (editorialSummaryBuilder_ == null) { + editorialSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Place.EditorialSummary, + com.google.maps.places.v1.Place.EditorialSummary.Builder, + com.google.maps.places.v1.Place.EditorialSummaryOrBuilder>( + getEditorialSummary(), getParentForChildren(), isClean()); + editorialSummary_ = null; + } + return editorialSummaryBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.Place) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.Place) + private static final com.google.maps.places.v1.Place DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.Place(); + } + + public static com.google.maps.places.v1.Place getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Place parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.Place getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java new file mode 100644 index 000000000000..7d9fa289e5f6 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java @@ -0,0 +1,1321 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/place.proto + +package com.google.maps.places.v1; + +public interface PlaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.Place) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of a place.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Required. The unique identifier of a place.
+   * 
+ * + * string id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * 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; + * + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + /** + * + * + *
+   * 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; + * + * @return The displayName. + */ + com.google.type.LocalizedText getDisplayName(); + /** + * + * + *
+   * 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; + */ + com.google.type.LocalizedTextOrBuilder getDisplayNameOrBuilder(); + + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @return A list containing the types. + */ + java.util.List getTypesList(); + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @return The count of types. + */ + int getTypesCount(); + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + /** + * + * + *
+   * A set of type tags for this result. For example, "political" and
+   * "locality".
+   * 
+ * + * repeated string types = 5; + * + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString getTypesBytes(int index); + + /** + * + * + *
+   * A human-readable phone number for the place, in national format.
+   * 
+ * + * string national_phone_number = 7; + * + * @return The nationalPhoneNumber. + */ + java.lang.String getNationalPhoneNumber(); + /** + * + * + *
+   * A human-readable phone number for the place, in national format.
+   * 
+ * + * string national_phone_number = 7; + * + * @return The bytes for nationalPhoneNumber. + */ + com.google.protobuf.ByteString getNationalPhoneNumberBytes(); + + /** + * + * + *
+   * A human-readable phone number for the place, in international format.
+   * 
+ * + * string international_phone_number = 8; + * + * @return The internationalPhoneNumber. + */ + java.lang.String getInternationalPhoneNumber(); + /** + * + * + *
+   * A human-readable phone number for the place, in international format.
+   * 
+ * + * string international_phone_number = 8; + * + * @return The bytes for internationalPhoneNumber. + */ + com.google.protobuf.ByteString getInternationalPhoneNumberBytes(); + + /** + * + * + *
+   * A full, human-readable address for this place.
+   * 
+ * + * string formatted_address = 9; + * + * @return The formattedAddress. + */ + java.lang.String getFormattedAddress(); + /** + * + * + *
+   * A full, human-readable address for this place.
+   * 
+ * + * string formatted_address = 9; + * + * @return The bytes for formattedAddress. + */ + com.google.protobuf.ByteString getFormattedAddressBytes(); + + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + java.util.List getAddressComponentsList(); + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + com.google.maps.places.v1.Place.AddressComponent getAddressComponents(int index); + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + int getAddressComponentsCount(); + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + java.util.List + getAddressComponentsOrBuilderList(); + /** + * + * + *
+   * Repeated components for each locality level.
+   * 
+ * + * repeated .google.maps.places.v1.Place.AddressComponent address_components = 10; + */ + com.google.maps.places.v1.Place.AddressComponentOrBuilder getAddressComponentsOrBuilder( + int index); + + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return Whether the plusCode field is set. + */ + boolean hasPlusCode(); + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + * + * @return The plusCode. + */ + com.google.maps.places.v1.Place.PlusCode getPlusCode(); + /** + * + * + *
+   * Plus code of the place location lat/long.
+   * 
+ * + * .google.maps.places.v1.Place.PlusCode plus_code = 11; + */ + com.google.maps.places.v1.Place.PlusCodeOrBuilder getPlusCodeOrBuilder(); + + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + * + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + * + * @return The location. + */ + com.google.type.LatLng getLocation(); + /** + * + * + *
+   * The position of this place.
+   * 
+ * + * .google.type.LatLng location = 12; + */ + com.google.type.LatLngOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return Whether the viewport field is set. + */ + boolean hasViewport(); + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + * + * @return The viewport. + */ + com.google.geo.type.Viewport getViewport(); + /** + * + * + *
+   * A viewport suitable for displaying the place on an average-sized map.
+   * 
+ * + * .google.geo.type.Viewport viewport = 13; + */ + com.google.geo.type.ViewportOrBuilder getViewportOrBuilder(); + + /** + * + * + *
+   * A rating between 1.0 and 5.0, based on user reviews of this place.
+   * 
+ * + * double rating = 14; + * + * @return The rating. + */ + double getRating(); + + /** + * + * + *
+   * A URL providing more information about this place.
+   * 
+ * + * string google_maps_uri = 15; + * + * @return The googleMapsUri. + */ + java.lang.String getGoogleMapsUri(); + /** + * + * + *
+   * A URL providing more information about this place.
+   * 
+ * + * string google_maps_uri = 15; + * + * @return The bytes for googleMapsUri. + */ + com.google.protobuf.ByteString getGoogleMapsUriBytes(); + + /** + * + * + *
+   * 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; + * + * @return The websiteUri. + */ + java.lang.String getWebsiteUri(); + /** + * + * + *
+   * 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; + * + * @return The bytes for websiteUri. + */ + com.google.protobuf.ByteString getWebsiteUriBytes(); + + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + java.util.List getReviewsList(); + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + com.google.maps.places.v1.Place.Review getReviews(int index); + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + int getReviewsCount(); + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + java.util.List + getReviewsOrBuilderList(); + /** + * + * + *
+   * List of reviews about this place.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Review reviews = 20; + */ + com.google.maps.places.v1.Place.ReviewOrBuilder getReviewsOrBuilder(int index); + + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return Whether the openingHours field is set. + */ + boolean hasOpeningHours(); + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + * + * @return The openingHours. + */ + com.google.maps.places.v1.Place.OpeningHours getOpeningHours(); + /** + * + * + *
+   * The regular hours of operation.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours opening_hours = 21; + */ + com.google.maps.places.v1.Place.OpeningHoursOrBuilder getOpeningHoursOrBuilder(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * int32 utc_offset_minutes = 22; + * + * @return The utcOffsetMinutes. + */ + int getUtcOffsetMinutes(); + + /** + * + * + *
+   * The place's address in adr microformat: http://microformats.org/wiki/adr.
+   * 
+ * + * string adr_format_address = 24; + * + * @return The adrFormatAddress. + */ + java.lang.String getAdrFormatAddress(); + /** + * + * + *
+   * The place's address in adr microformat: http://microformats.org/wiki/adr.
+   * 
+ * + * string adr_format_address = 24; + * + * @return The bytes for adrFormatAddress. + */ + com.google.protobuf.ByteString getAdrFormatAddressBytes(); + + /** + * + * + *
+   * The business status for the place.
+   * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The enum numeric value on the wire for businessStatus. + */ + int getBusinessStatusValue(); + /** + * + * + *
+   * The business status for the place.
+   * 
+ * + * .google.maps.places.v1.Place.BusinessStatus business_status = 25; + * + * @return The businessStatus. + */ + com.google.maps.places.v1.Place.BusinessStatus getBusinessStatus(); + + /** + * + * + *
+   * Price level of the place.
+   * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The enum numeric value on the wire for priceLevel. + */ + int getPriceLevelValue(); + /** + * + * + *
+   * Price level of the place.
+   * 
+ * + * .google.maps.places.v1.PriceLevel price_level = 26; + * + * @return The priceLevel. + */ + com.google.maps.places.v1.PriceLevel getPriceLevel(); + + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + java.util.List getAttributionsList(); + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + com.google.maps.places.v1.Place.Attribution getAttributions(int index); + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + int getAttributionsCount(); + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + java.util.List + getAttributionsOrBuilderList(); + /** + * + * + *
+   * A set of data provider that must be shown with this result.
+   * 
+ * + * repeated .google.maps.places.v1.Place.Attribution attributions = 27; + */ + com.google.maps.places.v1.Place.AttributionOrBuilder getAttributionsOrBuilder(int index); + + /** + * + * + *
+   * The total number of reviews (with or without text) for this place.
+   * 
+ * + * int32 user_rating_count = 28; + * + * @return The userRatingCount. + */ + int getUserRatingCount(); + + /** + * + * + *
+   * A truncated URL to an v2 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; + * + * @return The iconMaskBaseUri. + */ + java.lang.String getIconMaskBaseUri(); + /** + * + * + *
+   * A truncated URL to an v2 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; + * + * @return The bytes for iconMaskBaseUri. + */ + com.google.protobuf.ByteString getIconMaskBaseUriBytes(); + + /** + * + * + *
+   * Background color for icon_mask in hex format, e.g. #909CE1.
+   * 
+ * + * string icon_background_color = 30; + * + * @return The iconBackgroundColor. + */ + java.lang.String getIconBackgroundColor(); + /** + * + * + *
+   * Background color for icon_mask in hex format, e.g. #909CE1.
+   * 
+ * + * string icon_background_color = 30; + * + * @return The bytes for iconBackgroundColor. + */ + com.google.protobuf.ByteString getIconBackgroundColorBytes(); + + /** + * + * + *
+   * Specifies if the business supports takeout.
+   * 
+ * + * optional bool takeout = 33; + * + * @return Whether the takeout field is set. + */ + boolean hasTakeout(); + /** + * + * + *
+   * Specifies if the business supports takeout.
+   * 
+ * + * optional bool takeout = 33; + * + * @return The takeout. + */ + boolean getTakeout(); + + /** + * + * + *
+   * Specifies if the business supports delivery.
+   * 
+ * + * optional bool delivery = 34; + * + * @return Whether the delivery field is set. + */ + boolean hasDelivery(); + /** + * + * + *
+   * Specifies if the business supports delivery.
+   * 
+ * + * optional bool delivery = 34; + * + * @return The delivery. + */ + boolean getDelivery(); + + /** + * + * + *
+   * Specifies if the business supports indoor or outdoor seating options.
+   * 
+ * + * optional bool dine_in = 35; + * + * @return Whether the dineIn field is set. + */ + boolean hasDineIn(); + /** + * + * + *
+   * Specifies if the business supports indoor or outdoor seating options.
+   * 
+ * + * optional bool dine_in = 35; + * + * @return The dineIn. + */ + boolean getDineIn(); + + /** + * + * + *
+   * Specifies if the business supports curbside pickup.
+   * 
+ * + * optional bool curbside_pickup = 36; + * + * @return Whether the curbsidePickup field is set. + */ + boolean hasCurbsidePickup(); + /** + * + * + *
+   * Specifies if the business supports curbside pickup.
+   * 
+ * + * optional bool curbside_pickup = 36; + * + * @return The curbsidePickup. + */ + boolean getCurbsidePickup(); + + /** + * + * + *
+   * Specifies if the place has an entrance that is wheelchair-accessible.
+   * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return Whether the wheelchairAccessibleEntrance field is set. + */ + boolean hasWheelchairAccessibleEntrance(); + /** + * + * + *
+   * Specifies if the place has an entrance that is wheelchair-accessible.
+   * 
+ * + * optional bool wheelchair_accessible_entrance = 37; + * + * @return The wheelchairAccessibleEntrance. + */ + boolean getWheelchairAccessibleEntrance(); + + /** + * + * + *
+   * Specifies if the place supports reservations.
+   * 
+ * + * optional bool reservable = 38; + * + * @return Whether the reservable field is set. + */ + boolean hasReservable(); + /** + * + * + *
+   * Specifies if the place supports reservations.
+   * 
+ * + * optional bool reservable = 38; + * + * @return The reservable. + */ + boolean getReservable(); + + /** + * + * + *
+   * Specifies if the place serves breakfast.
+   * 
+ * + * optional bool serves_breakfast = 39; + * + * @return Whether the servesBreakfast field is set. + */ + boolean hasServesBreakfast(); + /** + * + * + *
+   * Specifies if the place serves breakfast.
+   * 
+ * + * optional bool serves_breakfast = 39; + * + * @return The servesBreakfast. + */ + boolean getServesBreakfast(); + + /** + * + * + *
+   * Specifies if the place serves lunch.
+   * 
+ * + * optional bool serves_lunch = 40; + * + * @return Whether the servesLunch field is set. + */ + boolean hasServesLunch(); + /** + * + * + *
+   * Specifies if the place serves lunch.
+   * 
+ * + * optional bool serves_lunch = 40; + * + * @return The servesLunch. + */ + boolean getServesLunch(); + + /** + * + * + *
+   * Specifies if the place serves dinner.
+   * 
+ * + * optional bool serves_dinner = 41; + * + * @return Whether the servesDinner field is set. + */ + boolean hasServesDinner(); + /** + * + * + *
+   * Specifies if the place serves dinner.
+   * 
+ * + * optional bool serves_dinner = 41; + * + * @return The servesDinner. + */ + boolean getServesDinner(); + + /** + * + * + *
+   * Specifies if the place serves beer.
+   * 
+ * + * optional bool serves_beer = 42; + * + * @return Whether the servesBeer field is set. + */ + boolean hasServesBeer(); + /** + * + * + *
+   * Specifies if the place serves beer.
+   * 
+ * + * optional bool serves_beer = 42; + * + * @return The servesBeer. + */ + boolean getServesBeer(); + + /** + * + * + *
+   * Specifies if the place serves wine.
+   * 
+ * + * optional bool serves_wine = 43; + * + * @return Whether the servesWine field is set. + */ + boolean hasServesWine(); + /** + * + * + *
+   * Specifies if the place serves wine.
+   * 
+ * + * optional bool serves_wine = 43; + * + * @return The servesWine. + */ + boolean getServesWine(); + + /** + * + * + *
+   * Specifies if the place serves brunch.
+   * 
+ * + * optional bool serves_brunch = 44; + * + * @return Whether the servesBrunch field is set. + */ + boolean hasServesBrunch(); + /** + * + * + *
+   * Specifies if the place serves brunch.
+   * 
+ * + * optional bool serves_brunch = 44; + * + * @return The servesBrunch. + */ + boolean getServesBrunch(); + + /** + * + * + *
+   * Specifies if the place serves vegetarian food.
+   * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return Whether the servesVegetarianFood field is set. + */ + boolean hasServesVegetarianFood(); + /** + * + * + *
+   * Specifies if the place serves vegetarian food.
+   * 
+ * + * optional bool serves_vegetarian_food = 45; + * + * @return The servesVegetarianFood. + */ + boolean getServesVegetarianFood(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return Whether the currentOpeningHours field is set. + */ + boolean hasCurrentOpeningHours(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + * + * @return The currentOpeningHours. + */ + com.google.maps.places.v1.Place.OpeningHours getCurrentOpeningHours(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.Place.OpeningHours current_opening_hours = 46; + */ + com.google.maps.places.v1.Place.OpeningHoursOrBuilder getCurrentOpeningHoursOrBuilder(); + + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + java.util.List + getCurrentSecondaryOpeningHoursList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + com.google.maps.places.v1.Place.OpeningHours getCurrentSecondaryOpeningHours(int index); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + int getCurrentSecondaryOpeningHoursCount(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + java.util.List + getCurrentSecondaryOpeningHoursOrBuilderList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours current_secondary_opening_hours = 47; + * + */ + com.google.maps.places.v1.Place.OpeningHoursOrBuilder getCurrentSecondaryOpeningHoursOrBuilder( + int index); + + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + java.util.List getSecondaryOpeningHoursList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + com.google.maps.places.v1.Place.OpeningHours getSecondaryOpeningHours(int index); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + int getSecondaryOpeningHoursCount(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + java.util.List + getSecondaryOpeningHoursOrBuilderList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.Place.OpeningHours secondary_opening_hours = 49; + */ + com.google.maps.places.v1.Place.OpeningHoursOrBuilder getSecondaryOpeningHoursOrBuilder( + int index); + + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return Whether the editorialSummary field is set. + */ + boolean hasEditorialSummary(); + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + * + * @return The editorialSummary. + */ + com.google.maps.places.v1.Place.EditorialSummary getEditorialSummary(); + /** + * + * + *
+   * 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.maps.places.v1.Place.EditorialSummary editorial_summary = 48; + */ + com.google.maps.places.v1.Place.EditorialSummaryOrBuilder getEditorialSummaryOrBuilder(); +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java new file mode 100644 index 000000000000..5379d57c3132 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java @@ -0,0 +1,357 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/place.proto + +package com.google.maps.places.v1; + +public final class PlaceProto { + private PlaceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_AddressComponent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_AddressComponent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_PlusCode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_PlusCode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_Review_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_Review_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_OpeningHours_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_OpeningHours_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_Attribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_Attribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Place_EditorialSummary_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n!google/maps/places/v1/place.proto\022\025goo" + + "gle.maps.places.v1\032\037google/api/field_beh" + + "avior.proto\032\036google/geo/type/viewport.pr" + + "oto\032\037google/protobuf/timestamp.proto\032\026go" + + "ogle/type/date.proto\032\030google/type/latlng" + + ".proto\032 google/type/localized_text.proto" + + "\"\264\033\n\005Place\022\017\n\002id\030\002 \001(\tB\003\340A\002\0220\n\014display_n" + + "ame\030\037 \001(\0132\032.google.type.LocalizedText\022\r\n" + + "\005types\030\005 \003(\t\022\035\n\025national_phone_number\030\007 " + + "\001(\t\022\"\n\032international_phone_number\030\010 \001(\t\022" + + "\031\n\021formatted_address\030\t \001(\t\022I\n\022address_co" + + "mponents\030\n \003(\0132-.google.maps.places.v1.P" + + "lace.AddressComponent\0228\n\tplus_code\030\013 \001(\013" + + "2%.google.maps.places.v1.Place.PlusCode\022" + + "%\n\010location\030\014 \001(\0132\023.google.type.LatLng\022+" + + "\n\010viewport\030\r \001(\0132\031.google.geo.type.Viewp" + + "ort\022\016\n\006rating\030\016 \001(\001\022\027\n\017google_maps_uri\030\017" + + " \001(\t\022\023\n\013website_uri\030\020 \001(\t\0224\n\007reviews\030\024 \003" + + "(\0132#.google.maps.places.v1.Place.Review\022" + + "@\n\ropening_hours\030\025 \001(\0132).google.maps.pla" + + "ces.v1.Place.OpeningHours\022\032\n\022utc_offset_" + + "minutes\030\026 \001(\005\022\032\n\022adr_format_address\030\030 \001(" + + "\t\022D\n\017business_status\030\031 \001(\0162+.google.maps" + + ".places.v1.Place.BusinessStatus\0226\n\013price" + + "_level\030\032 \001(\0162!.google.maps.places.v1.Pri" + + "ceLevel\022>\n\014attributions\030\033 \003(\0132(.google.m" + + "aps.places.v1.Place.Attribution\022\031\n\021user_" + + "rating_count\030\034 \001(\005\022\032\n\022icon_mask_base_uri" + + "\030\035 \001(\t\022\035\n\025icon_background_color\030\036 \001(\t\022\024\n" + + "\007takeout\030! \001(\010H\000\210\001\001\022\025\n\010delivery\030\" \001(\010H\001\210" + + "\001\001\022\024\n\007dine_in\030# \001(\010H\002\210\001\001\022\034\n\017curbside_pic" + + "kup\030$ \001(\010H\003\210\001\001\022+\n\036wheelchair_accessible_" + + "entrance\030% \001(\010H\004\210\001\001\022\027\n\nreservable\030& \001(\010H" + + "\005\210\001\001\022\035\n\020serves_breakfast\030\' \001(\010H\006\210\001\001\022\031\n\014s" + + "erves_lunch\030( \001(\010H\007\210\001\001\022\032\n\rserves_dinner\030" + + ") \001(\010H\010\210\001\001\022\030\n\013serves_beer\030* \001(\010H\t\210\001\001\022\030\n\013" + + "serves_wine\030+ \001(\010H\n\210\001\001\022\032\n\rserves_brunch\030" + + ", \001(\010H\013\210\001\001\022#\n\026serves_vegetarian_food\030- \001" + + "(\010H\014\210\001\001\022H\n\025current_opening_hours\030. \001(\0132)" + + ".google.maps.places.v1.Place.OpeningHour" + + "s\022R\n\037current_secondary_opening_hours\030/ \003" + + "(\0132).google.maps.places.v1.Place.Opening" + + "Hours\022J\n\027secondary_opening_hours\0301 \003(\0132)" + + ".google.maps.places.v1.Place.OpeningHour" + + "s\022H\n\021editorial_summary\0300 \001(\0132-.google.ma" + + "ps.places.v1.Place.EditorialSummary\032_\n\020A" + + "ddressComponent\022\021\n\tlong_text\030\001 \001(\t\022\022\n\nsh" + + "ort_text\030\002 \001(\t\022\r\n\005types\030\003 \003(\t\022\025\n\rlanguag" + + "e_code\030\004 \001(\t\0326\n\010PlusCode\022\023\n\013global_code\030" + + "\001 \001(\t\022\025\n\rcompound_code\030\002 \001(\t\032\221\002\n\006Review\022" + + "0\n\014publish_time\030\001 \001(\0132\032.google.protobuf." + + "Timestamp\022)\n!relative_publish_time_descr" + + "iption\030\002 \001(\t\022(\n\004text\030\t \001(\0132\032.google.type" + + ".LocalizedText\022\016\n\006author\030\004 \001(\t\022\022\n\nauthor" + + "_uri\030\005 \001(\t\022\030\n\020author_photo_uri\030\006 \001(\t\022\016\n\006" + + "rating\030\007 \001(\001\022\036\n\026original_language_code\030\n" + + " \001(\t\022\022\n\ntranslated\030\013 \001(\010\032\357\007\n\014OpeningHour" + + "s\022\020\n\010open_now\030\001 \001(\010\022M\n\007periods\030\002 \003(\0132<.g" + + "oogle.maps.places.v1.Place.OpeningHours." + + "OpeningHoursPeriod\022\034\n\024weekday_descriptio" + + "ns\030\003 \003(\t\022X\n\023secondary_hour_type\030\004 \001(\0162;." + + "google.maps.places.v1.Place.OpeningHours" + + ".SecondaryHourType\022J\n\014special_days\030\005 \003(\013" + + "24.google.maps.places.v1.Place.OpeningHo" + + "urs.SpecialDay\032\216\003\n\022OpeningHoursPeriod\022\\\n" + + "\004open\030\001 \001(\0132N.google.maps.places.v1.Plac" + + "e.OpeningHours.OpeningHoursPeriod.Openin" + + "gHoursPoint\022]\n\005close\030\002 \001(\0132N.google.maps" + + ".places.v1.Place.OpeningHours.OpeningHou" + + "rsPeriod.OpeningHoursPoint\032\272\001\n\021OpeningHo" + + "ursPoint\022\020\n\003day\030\001 \001(\005H\000\210\001\001\022\021\n\004hour\030\002 \001(\005" + + "H\001\210\001\001\022\023\n\006minute\030\003 \001(\005H\002\210\001\001\022\033\n\017date_depre" + + "cated\030\004 \001(\tB\002\030\001\022\037\n\004date\030\006 \001(\0132\021.google.t" + + "ype.Date\022\021\n\ttruncated\030\005 \001(\010B\006\n\004_dayB\007\n\005_" + + "hourB\t\n\007_minute\032-\n\nSpecialDay\022\037\n\004date\030\001 " + + "\001(\0132\021.google.type.Date\"\371\001\n\021SecondaryHour" + + "Type\022#\n\037SECONDARY_HOUR_TYPE_UNSPECIFIED\020" + + "\000\022\021\n\rDRIVE_THROUGH\020\001\022\016\n\nHAPPY_HOUR\020\002\022\014\n\010" + + "DELIVERY\020\003\022\013\n\007TAKEOUT\020\004\022\013\n\007KITCHEN\020\005\022\r\n\t" + + "BREAKFAST\020\006\022\t\n\005LUNCH\020\007\022\n\n\006DINNER\020\010\022\n\n\006BR" + + "UNCH\020\t\022\n\n\006PICKUP\020\n\022\n\n\006ACCESS\020\013\022\020\n\014SENIOR" + + "_HOURS\020\014\022\030\n\024ONLINE_SERVICE_HOURS\020\r\0325\n\013At" + + "tribution\022\020\n\010provider\030\001 \001(\t\022\024\n\014provider_" + + "uri\030\002 \001(\t\032@\n\020EditorialSummary\022,\n\010overvie" + + "w\030\001 \001(\0132\032.google.type.LocalizedText\"r\n\016B" + + "usinessStatus\022\037\n\033BUSINESS_STATUS_UNSPECI" + + "FIED\020\000\022\017\n\013OPERATIONAL\020\001\022\026\n\022CLOSED_TEMPOR" + + "ARILY\020\002\022\026\n\022CLOSED_PERMANENTLY\020\003B\n\n\010_take" + + "outB\013\n\t_deliveryB\n\n\010_dine_inB\022\n\020_curbsid" + + "e_pickupB!\n\037_wheelchair_accessible_entra" + + "nceB\r\n\013_reservableB\023\n\021_serves_breakfastB" + + "\017\n\r_serves_lunchB\020\n\016_serves_dinnerB\016\n\014_s" + + "erves_beerB\016\n\014_serves_wineB\020\n\016_serves_br" + + "unchB\031\n\027_serves_vegetarian_food*u\n\nPrice" + + "Level\022\033\n\027PRICE_LEVEL_UNSPECIFIED\020\000\022\010\n\004FR" + + "EE\020\001\022\017\n\013INEXPENSIVE\020\002\022\014\n\010MODERATE\020\003\022\r\n\tE" + + "XPENSIVE\020\004\022\022\n\016VERY_EXPENSIVE\020\005B\242\001\n\031com.g" + + "oogle.maps.places.v1B\nPlaceProtoP\001Z;goog" + + "le.golang.org/genproto/googleapis/maps/p" + + "laces/v1;places\370\001\001\242\002\006GMPSV1\252\002\025Google.Map" + + "s.Places.V1\312\002\025Google\\Maps\\Places\\V1b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.geo.type.ViewportProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.LatLngProto.getDescriptor(), + com.google.type.LocalizedTextProto.getDescriptor(), + }); + internal_static_google_maps_places_v1_Place_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_maps_places_v1_Place_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_descriptor, + new java.lang.String[] { + "Id", + "DisplayName", + "Types", + "NationalPhoneNumber", + "InternationalPhoneNumber", + "FormattedAddress", + "AddressComponents", + "PlusCode", + "Location", + "Viewport", + "Rating", + "GoogleMapsUri", + "WebsiteUri", + "Reviews", + "OpeningHours", + "UtcOffsetMinutes", + "AdrFormatAddress", + "BusinessStatus", + "PriceLevel", + "Attributions", + "UserRatingCount", + "IconMaskBaseUri", + "IconBackgroundColor", + "Takeout", + "Delivery", + "DineIn", + "CurbsidePickup", + "WheelchairAccessibleEntrance", + "Reservable", + "ServesBreakfast", + "ServesLunch", + "ServesDinner", + "ServesBeer", + "ServesWine", + "ServesBrunch", + "ServesVegetarianFood", + "CurrentOpeningHours", + "CurrentSecondaryOpeningHours", + "SecondaryOpeningHours", + "EditorialSummary", + "Takeout", + "Delivery", + "DineIn", + "CurbsidePickup", + "WheelchairAccessibleEntrance", + "Reservable", + "ServesBreakfast", + "ServesLunch", + "ServesDinner", + "ServesBeer", + "ServesWine", + "ServesBrunch", + "ServesVegetarianFood", + }); + internal_static_google_maps_places_v1_Place_AddressComponent_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(0); + internal_static_google_maps_places_v1_Place_AddressComponent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_AddressComponent_descriptor, + new java.lang.String[] { + "LongText", "ShortText", "Types", "LanguageCode", + }); + internal_static_google_maps_places_v1_Place_PlusCode_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(1); + internal_static_google_maps_places_v1_Place_PlusCode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_PlusCode_descriptor, + new java.lang.String[] { + "GlobalCode", "CompoundCode", + }); + internal_static_google_maps_places_v1_Place_Review_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(2); + internal_static_google_maps_places_v1_Place_Review_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_Review_descriptor, + new java.lang.String[] { + "PublishTime", + "RelativePublishTimeDescription", + "Text", + "Author", + "AuthorUri", + "AuthorPhotoUri", + "Rating", + "OriginalLanguageCode", + "Translated", + }); + internal_static_google_maps_places_v1_Place_OpeningHours_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(3); + internal_static_google_maps_places_v1_Place_OpeningHours_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_OpeningHours_descriptor, + new java.lang.String[] { + "OpenNow", "Periods", "WeekdayDescriptions", "SecondaryHourType", "SpecialDays", + }); + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor = + internal_static_google_maps_places_v1_Place_OpeningHours_descriptor.getNestedTypes().get(0); + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor, + new java.lang.String[] { + "Open", "Close", + }); + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor = + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_descriptor + .getNestedTypes() + .get(0); + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_OpeningHours_OpeningHoursPeriod_OpeningHoursPoint_descriptor, + new java.lang.String[] { + "Day", + "Hour", + "Minute", + "DateDeprecated", + "Date", + "Truncated", + "Day", + "Hour", + "Minute", + }); + internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor = + internal_static_google_maps_places_v1_Place_OpeningHours_descriptor.getNestedTypes().get(1); + internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_OpeningHours_SpecialDay_descriptor, + new java.lang.String[] { + "Date", + }); + internal_static_google_maps_places_v1_Place_Attribution_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(4); + internal_static_google_maps_places_v1_Place_Attribution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_Attribution_descriptor, + new java.lang.String[] { + "Provider", "ProviderUri", + }); + internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor = + internal_static_google_maps_places_v1_Place_descriptor.getNestedTypes().get(5); + internal_static_google_maps_places_v1_Place_EditorialSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Place_EditorialSummary_descriptor, + new java.lang.String[] { + "Overview", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.geo.type.ViewportProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.LatLngProto.getDescriptor(); + com.google.type.LocalizedTextProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java new file mode 100644 index 000000000000..8530edff4ca6 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java @@ -0,0 +1,197 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +public final class PlacesServiceProto { + private PlacesServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_Int32Range_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_Int32Range_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_SearchTextRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_SearchTextRequest_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_maps_places_v1_SearchTextResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_maps_places_v1_SearchTextResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/maps/places/v1/places_service.p" + + "roto\022\025google.maps.places.v1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\036goo" + + "gle/geo/type/viewport.proto\032$google/maps" + + "/places/v1/geometry.proto\032!google/maps/p" + + "laces/v1/place.proto\"@\n\nInt32Range\022\020\n\003mi" + + "n\030\001 \001(\005H\000\210\001\001\022\020\n\003max\030\002 \001(\005H\001\210\001\001B\006\n\004_minB\006" + + "\n\004_max\"\200\010\n\021SearchTextRequest\022\027\n\ntext_que" + + "ry\030\001 \001(\tB\003\340A\002\022\025\n\rlanguage_code\030\002 \001(\t\022\023\n\013" + + "region_code\030\003 \001(\t\022P\n\017rank_preference\030\004 \001" + + "(\01627.google.maps.places.v1.SearchTextReq" + + "uest.RankPreference\022G\n\010location\030\005 \001(\01321." + + "google.maps.places.v1.SearchTextRequest." + + "LocationB\002\030\001\022\025\n\rincluded_type\030\006 \001(\t\022\020\n\010o" + + "pen_now\030\007 \001(\010\022:\n\013price_range\030\010 \001(\0132!.goo" + + "gle.maps.places.v1.Int32RangeB\002\030\001\022\022\n\nmin" + + "_rating\030\t \001(\001\022\030\n\020max_result_count\030\n \001(\005\022" + + "7\n\014price_levels\030\013 \003(\0162!.google.maps.plac" + + "es.v1.PriceLevel\022\035\n\025strict_type_filterin" + + "g\030\014 \001(\010\022L\n\rlocation_bias\030\r \001(\01325.google." + + "maps.places.v1.SearchTextRequest.Locatio" + + "nBias\022Z\n\024location_restriction\030\016 \001(\0132<.go" + + "ogle.maps.places.v1.SearchTextRequest.Lo" + + "cationRestriction\032^\n\010Location\022.\n\trectang" + + "le\030\001 \001(\0132\031.google.geo.type.ViewportH\000\022\032\n" + + "\022strict_restriction\030\002 \001(\010B\006\n\004type\032w\n\014Loc" + + "ationBias\022.\n\trectangle\030\001 \001(\0132\031.google.ge" + + "o.type.ViewportH\000\022/\n\006circle\030\002 \001(\0132\035.goog" + + "le.maps.places.v1.CircleH\000B\006\n\004type\032M\n\023Lo" + + "cationRestriction\022.\n\trectangle\030\001 \001(\0132\031.g" + + "oogle.geo.type.ViewportH\000B\006\n\004type\"N\n\016Ran" + + "kPreference\022\037\n\033RANK_PREFERENCE_UNSPECIFI" + + "ED\020\000\022\014\n\010DISTANCE\020\001\022\r\n\tRELEVANCE\020\002\"B\n\022Sea" + + "rchTextResponse\022,\n\006places\030\001 \003(\0132\034.google" + + ".maps.places.v1.Place2\241\001\n\006Places\022}\n\nSear" + + "chText\022(.google.maps.places.v1.SearchTex" + + "tRequest\032).google.maps.places.v1.SearchT" + + "extResponse\"\032\202\323\344\223\002\024\"\017/v1/Text:search:\001*\032" + + "\030\312A\025places.googleapis.comB\252\001\n\031com.google" + + ".maps.places.v1B\022PlacesServiceProtoP\001Z;g" + + "oogle.golang.org/genproto/googleapis/map" + + "s/places/v1;places\370\001\001\242\002\006GMPSV1\252\002\025Google." + + "Maps.Places.V1\312\002\025Google\\Maps\\Places\\V1b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.geo.type.ViewportProto.getDescriptor(), + com.google.maps.places.v1.GeometryProto.getDescriptor(), + com.google.maps.places.v1.PlaceProto.getDescriptor(), + }); + internal_static_google_maps_places_v1_Int32Range_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_maps_places_v1_Int32Range_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_Int32Range_descriptor, + new java.lang.String[] { + "Min", "Max", "Min", "Max", + }); + internal_static_google_maps_places_v1_SearchTextRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_SearchTextRequest_descriptor, + new java.lang.String[] { + "TextQuery", + "LanguageCode", + "RegionCode", + "RankPreference", + "Location", + "IncludedType", + "OpenNow", + "PriceRange", + "MinRating", + "MaxResultCount", + "PriceLevels", + "StrictTypeFiltering", + "LocationBias", + "LocationRestriction", + }); + internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor = + internal_static_google_maps_places_v1_SearchTextRequest_descriptor.getNestedTypes().get(0); + internal_static_google_maps_places_v1_SearchTextRequest_Location_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor, + new java.lang.String[] { + "Rectangle", "StrictRestriction", "Type", + }); + internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor = + internal_static_google_maps_places_v1_SearchTextRequest_descriptor.getNestedTypes().get(1); + internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor, + new java.lang.String[] { + "Rectangle", "Circle", "Type", + }); + internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor = + internal_static_google_maps_places_v1_SearchTextRequest_descriptor.getNestedTypes().get(2); + internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor, + new java.lang.String[] { + "Rectangle", "Type", + }); + internal_static_google_maps_places_v1_SearchTextResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_maps_places_v1_SearchTextResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_maps_places_v1_SearchTextResponse_descriptor, + new java.lang.String[] { + "Places", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.geo.type.ViewportProto.getDescriptor(); + com.google.maps.places.v1.GeometryProto.getDescriptor(); + com.google.maps.places.v1.PlaceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java new file mode 100644 index 000000000000..81076f1089eb --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java @@ -0,0 +1,226 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/place.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * Price level of the place.
+ * 
+ * + * Protobuf enum {@code google.maps.places.v1.PriceLevel} + */ +public enum PriceLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Place price level is unspecified or unknown.
+   * 
+ * + * PRICE_LEVEL_UNSPECIFIED = 0; + */ + PRICE_LEVEL_UNSPECIFIED(0), + /** FREE = 1; */ + FREE(1), + /** + * + * + *
+   * Place provides inexpensive services.
+   * 
+ * + * INEXPENSIVE = 2; + */ + INEXPENSIVE(2), + /** + * + * + *
+   * Place provides moderately priced services.
+   * 
+ * + * MODERATE = 3; + */ + MODERATE(3), + /** + * + * + *
+   * Place provides expensive services.
+   * 
+ * + * EXPENSIVE = 4; + */ + EXPENSIVE(4), + /** + * + * + *
+   * Place provides very expensive services.
+   * 
+ * + * VERY_EXPENSIVE = 5; + */ + VERY_EXPENSIVE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Place price level is unspecified or unknown.
+   * 
+ * + * PRICE_LEVEL_UNSPECIFIED = 0; + */ + public static final int PRICE_LEVEL_UNSPECIFIED_VALUE = 0; + /** FREE = 1; */ + public static final int FREE_VALUE = 1; + /** + * + * + *
+   * Place provides inexpensive services.
+   * 
+ * + * INEXPENSIVE = 2; + */ + public static final int INEXPENSIVE_VALUE = 2; + /** + * + * + *
+   * Place provides moderately priced services.
+   * 
+ * + * MODERATE = 3; + */ + public static final int MODERATE_VALUE = 3; + /** + * + * + *
+   * Place provides expensive services.
+   * 
+ * + * EXPENSIVE = 4; + */ + public static final int EXPENSIVE_VALUE = 4; + /** + * + * + *
+   * Place provides very expensive services.
+   * 
+ * + * VERY_EXPENSIVE = 5; + */ + public static final int VERY_EXPENSIVE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PriceLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PriceLevel forNumber(int value) { + switch (value) { + case 0: + return PRICE_LEVEL_UNSPECIFIED; + case 1: + return FREE; + case 2: + return INEXPENSIVE; + case 3: + return MODERATE; + case 4: + return EXPENSIVE; + case 5: + return VERY_EXPENSIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PriceLevel findValueByNumber(int number) { + return PriceLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.places.v1.PlaceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final PriceLevel[] VALUES = values(); + + public static PriceLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PriceLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.places.v1.PriceLevel) +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java new file mode 100644 index 000000000000..7b95a6c7cab8 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java @@ -0,0 +1,6685 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * Request data structure for SearchText.
+ * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest} + */ +public final class SearchTextRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest) + SearchTextRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTextRequest.newBuilder() to construct. + private SearchTextRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTextRequest() { + textQuery_ = ""; + languageCode_ = ""; + regionCode_ = ""; + rankPreference_ = 0; + includedType_ = ""; + priceLevels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTextRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.class, + com.google.maps.places.v1.SearchTextRequest.Builder.class); + } + + /** + * + * + *
+   * How results will be ranked in the response.
+   * 
+ * + * Protobuf enum {@code google.maps.places.v1.SearchTextRequest.RankPreference} + */ + public enum RankPreference implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * RankPreference value not set. Will default to DISTANCE.
+     * 
+ * + * RANK_PREFERENCE_UNSPECIFIED = 0; + */ + RANK_PREFERENCE_UNSPECIFIED(0), + /** + * + * + *
+     * Ranks results by distance.
+     * 
+ * + * DISTANCE = 1; + */ + DISTANCE(1), + /** + * + * + *
+     * Ranks results by relevance. Sort order determined by normal ranking
+     * stack. See SortRefinement::RELEVANCE.
+     * 
+ * + * RELEVANCE = 2; + */ + RELEVANCE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * RankPreference value not set. Will default to DISTANCE.
+     * 
+ * + * RANK_PREFERENCE_UNSPECIFIED = 0; + */ + public static final int RANK_PREFERENCE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Ranks results by distance.
+     * 
+ * + * DISTANCE = 1; + */ + public static final int DISTANCE_VALUE = 1; + /** + * + * + *
+     * Ranks results by relevance. Sort order determined by normal ranking
+     * stack. See SortRefinement::RELEVANCE.
+     * 
+ * + * RELEVANCE = 2; + */ + public static final int RELEVANCE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RankPreference valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RankPreference forNumber(int value) { + switch (value) { + case 0: + return RANK_PREFERENCE_UNSPECIFIED; + case 1: + return DISTANCE; + case 2: + return RELEVANCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RankPreference findValueByNumber(int number) { + return RankPreference.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.maps.places.v1.SearchTextRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final RankPreference[] VALUES = values(); + + public static RankPreference valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RankPreference(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.maps.places.v1.SearchTextRequest.RankPreference) + } + + public interface LocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + boolean hasRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + com.google.geo.type.Viewport getRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); + + /** + * + * + *
+     * Make location field a strict restriction and filter out POIs outside of
+     * the given location. If location type field is unset this field will have
+     * no effect.
+     * 
+ * + * bool strict_restriction = 2; + * + * @return The strictRestriction. + */ + boolean getStrictRestriction(); + + public com.google.maps.places.v1.SearchTextRequest.Location.TypeCase getTypeCase(); + } + /** + * + * + *
+   * The region to search.
+   * Deprecated. Use LocationRestriction or LocationBias instead.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.Location} + */ + public static final class Location extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest.Location) + LocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Location() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.Location.class, + com.google.maps.places.v1.SearchTextRequest.Location.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECTANGLE(1), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return RECTANGLE; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int RECTANGLE_FIELD_NUMBER = 1; + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + + public static final int STRICT_RESTRICTION_FIELD_NUMBER = 2; + private boolean strictRestriction_ = false; + /** + * + * + *
+     * Make location field a strict restriction and filter out POIs outside of
+     * the given location. If location type field is unset this field will have
+     * no effect.
+     * 
+ * + * bool strict_restriction = 2; + * + * @return The strictRestriction. + */ + @java.lang.Override + public boolean getStrictRestriction() { + return strictRestriction_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.geo.type.Viewport) type_); + } + if (strictRestriction_ != false) { + output.writeBool(2, strictRestriction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.geo.type.Viewport) type_); + } + if (strictRestriction_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, strictRestriction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.SearchTextRequest.Location)) { + return super.equals(obj); + } + com.google.maps.places.v1.SearchTextRequest.Location other = + (com.google.maps.places.v1.SearchTextRequest.Location) obj; + + if (getStrictRestriction() != other.getStrictRestriction()) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getRectangle().equals(other.getRectangle())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STRICT_RESTRICTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStrictRestriction()); + switch (typeCase_) { + case 1: + hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; + hash = (53 * hash) + getRectangle().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.SearchTextRequest.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The region to search.
+     * Deprecated. Use LocationRestriction or LocationBias instead.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.Location} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest.Location) + com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.Location.class, + com.google.maps.places.v1.SearchTextRequest.Location.Builder.class); + } + + // Construct using com.google.maps.places.v1.SearchTextRequest.Location.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rectangleBuilder_ != null) { + rectangleBuilder_.clear(); + } + strictRestriction_ = false; + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_Location_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.Location getDefaultInstanceForType() { + return com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.Location build() { + com.google.maps.places.v1.SearchTextRequest.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.Location buildPartial() { + com.google.maps.places.v1.SearchTextRequest.Location result = + new com.google.maps.places.v1.SearchTextRequest.Location(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.SearchTextRequest.Location result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.strictRestriction_ = strictRestriction_; + } + } + + private void buildPartialOneofs(com.google.maps.places.v1.SearchTextRequest.Location result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 1 && rectangleBuilder_ != null) { + result.type_ = rectangleBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.SearchTextRequest.Location) { + return mergeFrom((com.google.maps.places.v1.SearchTextRequest.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.SearchTextRequest.Location other) { + if (other == com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance()) + return this; + if (other.getStrictRestriction() != false) { + setStrictRestriction(other.getStrictRestriction()); + } + switch (other.getTypeCase()) { + case RECTANGLE: + { + mergeRectangle(other.getRectangle()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRectangleFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 1; + break; + } // case 10 + case 16: + { + strictRestriction_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + rectangleBuilder_; + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return rectangleBuilder_.getMessage(); + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + rectangleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { + if (rectangleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + rectangleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder mergeRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { + type_ = + com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + rectangleBuilder_.mergeFrom(value); + } else { + rectangleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder clearRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + rectangleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public com.google.geo.type.Viewport.Builder getRectangleBuilder() { + return getRectangleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { + return rectangleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + getRectangleFieldBuilder() { + if (rectangleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.geo.type.Viewport.getDefaultInstance(); + } + rectangleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + return rectangleBuilder_; + } + + private boolean strictRestriction_; + /** + * + * + *
+       * Make location field a strict restriction and filter out POIs outside of
+       * the given location. If location type field is unset this field will have
+       * no effect.
+       * 
+ * + * bool strict_restriction = 2; + * + * @return The strictRestriction. + */ + @java.lang.Override + public boolean getStrictRestriction() { + return strictRestriction_; + } + /** + * + * + *
+       * Make location field a strict restriction and filter out POIs outside of
+       * the given location. If location type field is unset this field will have
+       * no effect.
+       * 
+ * + * bool strict_restriction = 2; + * + * @param value The strictRestriction to set. + * @return This builder for chaining. + */ + public Builder setStrictRestriction(boolean value) { + + strictRestriction_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Make location field a strict restriction and filter out POIs outside of
+       * the given location. If location type field is unset this field will have
+       * no effect.
+       * 
+ * + * bool strict_restriction = 2; + * + * @return This builder for chaining. + */ + public Builder clearStrictRestriction() { + bitField0_ = (bitField0_ & ~0x00000002); + strictRestriction_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchTextRequest.Location) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest.Location) + private static final com.google.maps.places.v1.SearchTextRequest.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest.Location(); + } + + public static com.google.maps.places.v1.SearchTextRequest.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LocationBiasOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest.LocationBias) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + boolean hasRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + com.google.geo.type.Viewport getRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); + + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return Whether the circle field is set. + */ + boolean hasCircle(); + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return The circle. + */ + com.google.maps.places.v1.Circle getCircle(); + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder(); + + public com.google.maps.places.v1.SearchTextRequest.LocationBias.TypeCase getTypeCase(); + } + /** + * + * + *
+   * The region to search. This location serves as a bias which means results
+   * around given location might be returned.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationBias} + */ + public static final class LocationBias extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest.LocationBias) + LocationBiasOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationBias.newBuilder() to construct. + private LocationBias(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationBias() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationBias(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.LocationBias.class, + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECTANGLE(1), + CIRCLE(2), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return RECTANGLE; + case 2: + return CIRCLE; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int RECTANGLE_FIELD_NUMBER = 1; + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + + public static final int CIRCLE_FIELD_NUMBER = 2; + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return typeCase_ == 2; + } + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return The circle. + */ + @java.lang.Override + public com.google.maps.places.v1.Circle getCircle() { + if (typeCase_ == 2) { + return (com.google.maps.places.v1.Circle) type_; + } + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } + /** + * + * + *
+     * A circle defined by center point and radius.
+     * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + @java.lang.Override + public com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder() { + if (typeCase_ == 2) { + return (com.google.maps.places.v1.Circle) type_; + } + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.geo.type.Viewport) type_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.maps.places.v1.Circle) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.geo.type.Viewport) type_); + } + if (typeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.maps.places.v1.Circle) type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.SearchTextRequest.LocationBias)) { + return super.equals(obj); + } + com.google.maps.places.v1.SearchTextRequest.LocationBias other = + (com.google.maps.places.v1.SearchTextRequest.LocationBias) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getRectangle().equals(other.getRectangle())) return false; + break; + case 2: + if (!getCircle().equals(other.getCircle())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; + hash = (53 * hash) + getRectangle().hashCode(); + break; + case 2: + hash = (37 * hash) + CIRCLE_FIELD_NUMBER; + hash = (53 * hash) + getCircle().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.SearchTextRequest.LocationBias prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The region to search. This location serves as a bias which means results
+     * around given location might be returned.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationBias} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest.LocationBias) + com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.LocationBias.class, + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder.class); + } + + // Construct using com.google.maps.places.v1.SearchTextRequest.LocationBias.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rectangleBuilder_ != null) { + rectangleBuilder_.clear(); + } + if (circleBuilder_ != null) { + circleBuilder_.clear(); + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationBias_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstanceForType() { + return com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBias build() { + com.google.maps.places.v1.SearchTextRequest.LocationBias result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBias buildPartial() { + com.google.maps.places.v1.SearchTextRequest.LocationBias result = + new com.google.maps.places.v1.SearchTextRequest.LocationBias(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.maps.places.v1.SearchTextRequest.LocationBias result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.places.v1.SearchTextRequest.LocationBias result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 1 && rectangleBuilder_ != null) { + result.type_ = rectangleBuilder_.build(); + } + if (typeCase_ == 2 && circleBuilder_ != null) { + result.type_ = circleBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.SearchTextRequest.LocationBias) { + return mergeFrom((com.google.maps.places.v1.SearchTextRequest.LocationBias) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.SearchTextRequest.LocationBias other) { + if (other == com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance()) + return this; + switch (other.getTypeCase()) { + case RECTANGLE: + { + mergeRectangle(other.getRectangle()); + break; + } + case CIRCLE: + { + mergeCircle(other.getCircle()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRectangleFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getCircleFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + rectangleBuilder_; + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return rectangleBuilder_.getMessage(); + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + rectangleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { + if (rectangleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + rectangleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder mergeRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { + type_ = + com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + rectangleBuilder_.mergeFrom(value); + } else { + rectangleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder clearRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + rectangleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public com.google.geo.type.Viewport.Builder getRectangleBuilder() { + return getRectangleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { + return rectangleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + getRectangleFieldBuilder() { + if (rectangleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.geo.type.Viewport.getDefaultInstance(); + } + rectangleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + return rectangleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Circle, + com.google.maps.places.v1.Circle.Builder, + com.google.maps.places.v1.CircleOrBuilder> + circleBuilder_; + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return Whether the circle field is set. + */ + @java.lang.Override + public boolean hasCircle() { + return typeCase_ == 2; + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + * + * @return The circle. + */ + @java.lang.Override + public com.google.maps.places.v1.Circle getCircle() { + if (circleBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.maps.places.v1.Circle) type_; + } + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return circleBuilder_.getMessage(); + } + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + public Builder setCircle(com.google.maps.places.v1.Circle value) { + if (circleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + circleBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + public Builder setCircle(com.google.maps.places.v1.Circle.Builder builderForValue) { + if (circleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + circleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + public Builder mergeCircle(com.google.maps.places.v1.Circle value) { + if (circleBuilder_ == null) { + if (typeCase_ == 2 && type_ != com.google.maps.places.v1.Circle.getDefaultInstance()) { + type_ = + com.google.maps.places.v1.Circle.newBuilder( + (com.google.maps.places.v1.Circle) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + circleBuilder_.mergeFrom(value); + } else { + circleBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + public Builder clearCircle() { + if (circleBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + circleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + public com.google.maps.places.v1.Circle.Builder getCircleBuilder() { + return getCircleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + @java.lang.Override + public com.google.maps.places.v1.CircleOrBuilder getCircleOrBuilder() { + if ((typeCase_ == 2) && (circleBuilder_ != null)) { + return circleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.maps.places.v1.Circle) type_; + } + return com.google.maps.places.v1.Circle.getDefaultInstance(); + } + } + /** + * + * + *
+       * A circle defined by center point and radius.
+       * 
+ * + * .google.maps.places.v1.Circle circle = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Circle, + com.google.maps.places.v1.Circle.Builder, + com.google.maps.places.v1.CircleOrBuilder> + getCircleFieldBuilder() { + if (circleBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.maps.places.v1.Circle.getDefaultInstance(); + } + circleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Circle, + com.google.maps.places.v1.Circle.Builder, + com.google.maps.places.v1.CircleOrBuilder>( + (com.google.maps.places.v1.Circle) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged(); + return circleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchTextRequest.LocationBias) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest.LocationBias) + private static final com.google.maps.places.v1.SearchTextRequest.LocationBias DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest.LocationBias(); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationBias parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBias getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LocationRestrictionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest.LocationRestriction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + boolean hasRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + com.google.geo.type.Viewport getRectangle(); + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder(); + + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction.TypeCase getTypeCase(); + } + /** + * + * + *
+   * The region to search. This location serves as a restriction which means
+   * results outside given location will not be returned.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationRestriction} + */ + public static final class LocationRestriction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextRequest.LocationRestriction) + LocationRestrictionOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocationRestriction.newBuilder() to construct. + private LocationRestriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocationRestriction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocationRestriction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.class, + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECTANGLE(1), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return RECTANGLE; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int RECTANGLE_FIELD_NUMBER = 1; + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + /** + * + * + *
+     * A rectangle box defined by northeast and southwest corner.
+     * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.geo.type.Viewport) type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.geo.type.Viewport) type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.SearchTextRequest.LocationRestriction)) { + return super.equals(obj); + } + com.google.maps.places.v1.SearchTextRequest.LocationRestriction other = + (com.google.maps.places.v1.SearchTextRequest.LocationRestriction) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getRectangle().equals(other.getRectangle())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + RECTANGLE_FIELD_NUMBER; + hash = (53 * hash) + getRectangle().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The region to search. This location serves as a restriction which means
+     * results outside given location will not be returned.
+     * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest.LocationRestriction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest.LocationRestriction) + com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.class, + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder.class); + } + + // Construct using + // com.google.maps.places.v1.SearchTextRequest.LocationRestriction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rectangleBuilder_ != null) { + rectangleBuilder_.clear(); + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_LocationRestriction_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction + getDefaultInstanceForType() { + return com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction build() { + com.google.maps.places.v1.SearchTextRequest.LocationRestriction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction buildPartial() { + com.google.maps.places.v1.SearchTextRequest.LocationRestriction result = + new com.google.maps.places.v1.SearchTextRequest.LocationRestriction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 1 && rectangleBuilder_ != null) { + result.type_ = rectangleBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.SearchTextRequest.LocationRestriction) { + return mergeFrom((com.google.maps.places.v1.SearchTextRequest.LocationRestriction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction other) { + if (other + == com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance()) + return this; + switch (other.getTypeCase()) { + case RECTANGLE: + { + mergeRectangle(other.getRectangle()); + break; + } + case TYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRectangleFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + rectangleBuilder_; + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return Whether the rectangle field is set. + */ + @java.lang.Override + public boolean hasRectangle() { + return typeCase_ == 1; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + * + * @return The rectangle. + */ + @java.lang.Override + public com.google.geo.type.Viewport getRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return rectangleBuilder_.getMessage(); + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + rectangleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder setRectangle(com.google.geo.type.Viewport.Builder builderForValue) { + if (rectangleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + rectangleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder mergeRectangle(com.google.geo.type.Viewport value) { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1 && type_ != com.google.geo.type.Viewport.getDefaultInstance()) { + type_ = + com.google.geo.type.Viewport.newBuilder((com.google.geo.type.Viewport) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + rectangleBuilder_.mergeFrom(value); + } else { + rectangleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public Builder clearRectangle() { + if (rectangleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + rectangleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + public com.google.geo.type.Viewport.Builder getRectangleBuilder() { + return getRectangleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + @java.lang.Override + public com.google.geo.type.ViewportOrBuilder getRectangleOrBuilder() { + if ((typeCase_ == 1) && (rectangleBuilder_ != null)) { + return rectangleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.geo.type.Viewport) type_; + } + return com.google.geo.type.Viewport.getDefaultInstance(); + } + } + /** + * + * + *
+       * A rectangle box defined by northeast and southwest corner.
+       * 
+ * + * .google.geo.type.Viewport rectangle = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder> + getRectangleFieldBuilder() { + if (rectangleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.geo.type.Viewport.getDefaultInstance(); + } + rectangleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.geo.type.Viewport, + com.google.geo.type.Viewport.Builder, + com.google.geo.type.ViewportOrBuilder>( + (com.google.geo.type.Viewport) type_, getParentForChildren(), isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + return rectangleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchTextRequest.LocationRestriction) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest.LocationRestriction) + private static final com.google.maps.places.v1.SearchTextRequest.LocationRestriction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + } + + public static com.google.maps.places.v1.SearchTextRequest.LocationRestriction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationRestriction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TEXT_QUERY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object textQuery_ = ""; + /** + * + * + *
+   * Required. The text query for textual search.
+   * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textQuery. + */ + @java.lang.Override + public java.lang.String getTextQuery() { + java.lang.Object ref = textQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + textQuery_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The text query for textual search.
+   * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextQueryBytes() { + java.lang.Object ref = textQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + textQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object 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.
+   * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * 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; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + /** + * + * + *
+   * The Unicode country/region code (CLDR) of the location where the
+   * request is coming from. It is used to display the place details, like
+   * region-specific place name, if available.
+   * For more information, see
+   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+   * Note that 3-digit region codes are not currently supported.
+   * 
+ * + * string region_code = 3; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * The Unicode country/region code (CLDR) of the location where the
+   * request is coming from. It is used to display the place details, like
+   * region-specific place name, if available.
+   * For more information, see
+   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+   * Note that 3-digit region codes are not currently supported.
+   * 
+ * + * string region_code = 3; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANK_PREFERENCE_FIELD_NUMBER = 4; + private int rankPreference_ = 0; + /** + * + * + *
+   * How results will be ranked in the response.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The enum numeric value on the wire for rankPreference. + */ + @java.lang.Override + public int getRankPreferenceValue() { + return rankPreference_; + } + /** + * + * + *
+   * How results will be ranked in the response.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The rankPreference. + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.RankPreference getRankPreference() { + com.google.maps.places.v1.SearchTextRequest.RankPreference result = + com.google.maps.places.v1.SearchTextRequest.RankPreference.forNumber(rankPreference_); + return result == null + ? com.google.maps.places.v1.SearchTextRequest.RankPreference.UNRECOGNIZED + : result; + } + + public static final int LOCATION_FIELD_NUMBER = 5; + private com.google.maps.places.v1.SearchTextRequest.Location location_; + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return Whether the location field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasLocation() { + return location_ != null; + } + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return The location. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.places.v1.SearchTextRequest.Location getLocation() { + return location_ == null + ? com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance() + : location_; + } + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder getLocationOrBuilder() { + return location_ == null + ? com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance() + : location_; + } + + public static final int INCLUDED_TYPE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object includedType_ = ""; + /** + * + * + *
+   * The requested place type. Full list of types supported:
+   * https://developers.google.com/places/supported_types. Only support one
+   * included type.
+   * 
+ * + * string included_type = 6; + * + * @return The includedType. + */ + @java.lang.Override + public java.lang.String getIncludedType() { + java.lang.Object ref = includedType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + includedType_ = s; + return s; + } + } + /** + * + * + *
+   * The requested place type. Full list of types supported:
+   * https://developers.google.com/places/supported_types. Only support one
+   * included type.
+   * 
+ * + * string included_type = 6; + * + * @return The bytes for includedType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncludedTypeBytes() { + java.lang.Object ref = includedType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + includedType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPEN_NOW_FIELD_NUMBER = 7; + private boolean openNow_ = false; + /** + * + * + *
+   * Used to restrict the search to places that are open at a specific time.
+   * open_now marks if a business is currently open.
+   * 
+ * + * bool open_now = 7; + * + * @return The openNow. + */ + @java.lang.Override + public boolean getOpenNow() { + return openNow_; + } + + public static final int PRICE_RANGE_FIELD_NUMBER = 8; + private com.google.maps.places.v1.Int32Range priceRange_; + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return Whether the priceRange field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasPriceRange() { + return priceRange_ != null; + } + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return The priceRange. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.places.v1.Int32Range getPriceRange() { + return priceRange_ == null + ? com.google.maps.places.v1.Int32Range.getDefaultInstance() + : priceRange_; + } + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.maps.places.v1.Int32RangeOrBuilder getPriceRangeOrBuilder() { + return priceRange_ == null + ? com.google.maps.places.v1.Int32Range.getDefaultInstance() + : priceRange_; + } + + public static final int MIN_RATING_FIELD_NUMBER = 9; + private double minRating_ = 0D; + /** + * + * + *
+   * Filter out results whose average user rating is strictly less than this
+   * limit. A valid value must be an float between 0 and 5 (inclusively) at a
+   * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
+   * parity with LocalRefinement_UserRating. 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; + * + * @return The minRating. + */ + @java.lang.Override + public double getMinRating() { + return minRating_; + } + + public static final int MAX_RESULT_COUNT_FIELD_NUMBER = 10; + private int maxResultCount_ = 0; + /** + * + * + *
+   * Maximum number of results to return. It must be between 1 and 20,
+   * 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 = 10; + * + * @return The maxResultCount. + */ + @java.lang.Override + public int getMaxResultCount() { + return maxResultCount_; + } + + public static final int PRICE_LEVELS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List priceLevels_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.places.v1.PriceLevel> + priceLevels_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.maps.places.v1.PriceLevel>() { + public com.google.maps.places.v1.PriceLevel convert(java.lang.Integer from) { + com.google.maps.places.v1.PriceLevel result = + com.google.maps.places.v1.PriceLevel.forNumber(from); + return result == null ? com.google.maps.places.v1.PriceLevel.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the priceLevels. + */ + @java.lang.Override + public java.util.List getPriceLevelsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.places.v1.PriceLevel>( + priceLevels_, priceLevels_converter_); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return The count of priceLevels. + */ + @java.lang.Override + public int getPriceLevelsCount() { + return priceLevels_.size(); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + @java.lang.Override + public com.google.maps.places.v1.PriceLevel getPriceLevels(int index) { + return priceLevels_converter_.convert(priceLevels_.get(index)); + } + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + @java.lang.Override + public java.util.List getPriceLevelsValueList() { + return 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.
+   * 
+ * + * repeated .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of priceLevels at the given index. + */ + @java.lang.Override + public int getPriceLevelsValue(int index) { + return priceLevels_.get(index); + } + + private int priceLevelsMemoizedSerializedSize; + + public static final int STRICT_TYPE_FILTERING_FIELD_NUMBER = 12; + private boolean strictTypeFiltering_ = false; + /** + * + * + *
+   * 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; + * + * @return The strictTypeFiltering. + */ + @java.lang.Override + public boolean getStrictTypeFiltering() { + return strictTypeFiltering_; + } + + public static final int LOCATION_BIAS_FIELD_NUMBER = 13; + private com.google.maps.places.v1.SearchTextRequest.LocationBias 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return Whether the locationBias field is set. + */ + @java.lang.Override + public boolean hasLocationBias() { + return locationBias_ != null; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return The locationBias. + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBias getLocationBias() { + return locationBias_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() + : 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder + getLocationBiasOrBuilder() { + return locationBias_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() + : locationBias_; + } + + public static final int LOCATION_RESTRICTION_FIELD_NUMBER = 14; + private com.google.maps.places.v1.SearchTextRequest.LocationRestriction 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return Whether the locationRestriction field is set. + */ + @java.lang.Override + public boolean hasLocationRestriction() { + return locationRestriction_ != null; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return The locationRestriction. + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction getLocationRestriction() { + return locationRestriction_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() + : 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder + getLocationRestrictionOrBuilder() { + return locationRestriction_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() + : locationRestriction_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, textQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, regionCode_); + } + if (rankPreference_ + != com.google.maps.places.v1.SearchTextRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, rankPreference_); + } + if (location_ != null) { + output.writeMessage(5, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(includedType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, includedType_); + } + if (openNow_ != false) { + output.writeBool(7, openNow_); + } + if (priceRange_ != null) { + output.writeMessage(8, getPriceRange()); + } + if (java.lang.Double.doubleToRawLongBits(minRating_) != 0) { + output.writeDouble(9, minRating_); + } + if (maxResultCount_ != 0) { + output.writeInt32(10, maxResultCount_); + } + if (getPriceLevelsList().size() > 0) { + output.writeUInt32NoTag(90); + output.writeUInt32NoTag(priceLevelsMemoizedSerializedSize); + } + for (int i = 0; i < priceLevels_.size(); i++) { + output.writeEnumNoTag(priceLevels_.get(i)); + } + if (strictTypeFiltering_ != false) { + output.writeBool(12, strictTypeFiltering_); + } + if (locationBias_ != null) { + output.writeMessage(13, getLocationBias()); + } + if (locationRestriction_ != null) { + output.writeMessage(14, getLocationRestriction()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, textQuery_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, regionCode_); + } + if (rankPreference_ + != com.google.maps.places.v1.SearchTextRequest.RankPreference.RANK_PREFERENCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, rankPreference_); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(includedType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, includedType_); + } + if (openNow_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, openNow_); + } + if (priceRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPriceRange()); + } + if (java.lang.Double.doubleToRawLongBits(minRating_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(9, minRating_); + } + if (maxResultCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, maxResultCount_); + } + { + int dataSize = 0; + for (int i = 0; i < priceLevels_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(priceLevels_.get(i)); + } + size += dataSize; + if (!getPriceLevelsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + priceLevelsMemoizedSerializedSize = dataSize; + } + if (strictTypeFiltering_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, strictTypeFiltering_); + } + if (locationBias_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getLocationBias()); + } + if (locationRestriction_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLocationRestriction()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.SearchTextRequest)) { + return super.equals(obj); + } + com.google.maps.places.v1.SearchTextRequest other = + (com.google.maps.places.v1.SearchTextRequest) obj; + + if (!getTextQuery().equals(other.getTextQuery())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (rankPreference_ != other.rankPreference_) return false; + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) return false; + } + if (!getIncludedType().equals(other.getIncludedType())) return false; + if (getOpenNow() != other.getOpenNow()) return false; + if (hasPriceRange() != other.hasPriceRange()) return false; + if (hasPriceRange()) { + if (!getPriceRange().equals(other.getPriceRange())) return false; + } + if (java.lang.Double.doubleToLongBits(getMinRating()) + != java.lang.Double.doubleToLongBits(other.getMinRating())) return false; + if (getMaxResultCount() != other.getMaxResultCount()) return false; + if (!priceLevels_.equals(other.priceLevels_)) return false; + if (getStrictTypeFiltering() != other.getStrictTypeFiltering()) return false; + if (hasLocationBias() != other.hasLocationBias()) return false; + if (hasLocationBias()) { + if (!getLocationBias().equals(other.getLocationBias())) return false; + } + if (hasLocationRestriction() != other.hasLocationRestriction()) return false; + if (hasLocationRestriction()) { + if (!getLocationRestriction().equals(other.getLocationRestriction())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getTextQuery().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + RANK_PREFERENCE_FIELD_NUMBER; + hash = (53 * hash) + rankPreference_; + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (37 * hash) + INCLUDED_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getIncludedType().hashCode(); + hash = (37 * hash) + OPEN_NOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOpenNow()); + if (hasPriceRange()) { + hash = (37 * hash) + PRICE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getPriceRange().hashCode(); + } + hash = (37 * hash) + MIN_RATING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinRating())); + hash = (37 * hash) + MAX_RESULT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxResultCount(); + if (getPriceLevelsCount() > 0) { + hash = (37 * hash) + PRICE_LEVELS_FIELD_NUMBER; + hash = (53 * hash) + priceLevels_.hashCode(); + } + hash = (37 * hash) + STRICT_TYPE_FILTERING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStrictTypeFiltering()); + if (hasLocationBias()) { + hash = (37 * hash) + LOCATION_BIAS_FIELD_NUMBER; + hash = (53 * hash) + getLocationBias().hashCode(); + } + if (hasLocationRestriction()) { + hash = (37 * hash) + LOCATION_RESTRICTION_FIELD_NUMBER; + hash = (53 * hash) + getLocationRestriction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.SearchTextRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request data structure for SearchText.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextRequest) + com.google.maps.places.v1.SearchTextRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextRequest.class, + com.google.maps.places.v1.SearchTextRequest.Builder.class); + } + + // Construct using com.google.maps.places.v1.SearchTextRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + textQuery_ = ""; + languageCode_ = ""; + regionCode_ = ""; + rankPreference_ = 0; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + includedType_ = ""; + openNow_ = false; + priceRange_ = null; + if (priceRangeBuilder_ != null) { + priceRangeBuilder_.dispose(); + priceRangeBuilder_ = null; + } + minRating_ = 0D; + maxResultCount_ = 0; + priceLevels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + strictTypeFiltering_ = false; + locationBias_ = null; + if (locationBiasBuilder_ != null) { + locationBiasBuilder_.dispose(); + locationBiasBuilder_ = null; + } + locationRestriction_ = null; + if (locationRestrictionBuilder_ != null) { + locationRestrictionBuilder_.dispose(); + locationRestrictionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextRequest_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest getDefaultInstanceForType() { + return com.google.maps.places.v1.SearchTextRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest build() { + com.google.maps.places.v1.SearchTextRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest buildPartial() { + com.google.maps.places.v1.SearchTextRequest result = + new com.google.maps.places.v1.SearchTextRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.places.v1.SearchTextRequest result) { + if (((bitField0_ & 0x00000400) != 0)) { + priceLevels_ = java.util.Collections.unmodifiableList(priceLevels_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.priceLevels_ = priceLevels_; + } + + private void buildPartial0(com.google.maps.places.v1.SearchTextRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.textQuery_ = textQuery_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rankPreference_ = rankPreference_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.includedType_ = includedType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.openNow_ = openNow_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.priceRange_ = priceRangeBuilder_ == null ? priceRange_ : priceRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.minRating_ = minRating_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.maxResultCount_ = maxResultCount_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.strictTypeFiltering_ = strictTypeFiltering_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.locationBias_ = + locationBiasBuilder_ == null ? locationBias_ : locationBiasBuilder_.build(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.locationRestriction_ = + locationRestrictionBuilder_ == null + ? locationRestriction_ + : locationRestrictionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.SearchTextRequest) { + return mergeFrom((com.google.maps.places.v1.SearchTextRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.SearchTextRequest other) { + if (other == com.google.maps.places.v1.SearchTextRequest.getDefaultInstance()) return this; + if (!other.getTextQuery().isEmpty()) { + textQuery_ = other.textQuery_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.rankPreference_ != 0) { + setRankPreferenceValue(other.getRankPreferenceValue()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (!other.getIncludedType().isEmpty()) { + includedType_ = other.includedType_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getOpenNow() != false) { + setOpenNow(other.getOpenNow()); + } + if (other.hasPriceRange()) { + mergePriceRange(other.getPriceRange()); + } + if (other.getMinRating() != 0D) { + setMinRating(other.getMinRating()); + } + if (other.getMaxResultCount() != 0) { + setMaxResultCount(other.getMaxResultCount()); + } + if (!other.priceLevels_.isEmpty()) { + if (priceLevels_.isEmpty()) { + priceLevels_ = other.priceLevels_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensurePriceLevelsIsMutable(); + priceLevels_.addAll(other.priceLevels_); + } + onChanged(); + } + if (other.getStrictTypeFiltering() != false) { + setStrictTypeFiltering(other.getStrictTypeFiltering()); + } + if (other.hasLocationBias()) { + mergeLocationBias(other.getLocationBias()); + } + if (other.hasLocationRestriction()) { + mergeLocationRestriction(other.getLocationRestriction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + textQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + rankPreference_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage(getLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + includedType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + openNow_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage(getPriceRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 73: + { + minRating_ = input.readDouble(); + bitField0_ |= 0x00000100; + break; + } // case 73 + case 80: + { + maxResultCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + int tmpRaw = input.readEnum(); + ensurePriceLevelsIsMutable(); + priceLevels_.add(tmpRaw); + break; + } // case 88 + case 90: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensurePriceLevelsIsMutable(); + priceLevels_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 90 + case 96: + { + strictTypeFiltering_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: + { + input.readMessage(getLocationBiasFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage( + getLocationRestrictionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object textQuery_ = ""; + /** + * + * + *
+     * Required. The text query for textual search.
+     * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textQuery. + */ + public java.lang.String getTextQuery() { + java.lang.Object ref = textQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + textQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The text query for textual search.
+     * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textQuery. + */ + public com.google.protobuf.ByteString getTextQueryBytes() { + java.lang.Object ref = textQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + textQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The text query for textual search.
+     * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The textQuery to set. + * @return This builder for chaining. + */ + public Builder setTextQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + textQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The text query for textual search.
+     * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTextQuery() { + textQuery_ = getDefaultInstance().getTextQuery(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The text query for textual search.
+     * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for textQuery to set. + * @return This builder for chaining. + */ + public Builder setTextQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + textQuery_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object 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.
+     * 
+ * + * string language_code = 2; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * The Unicode country/region code (CLDR) of the location where the
+     * request is coming from. It is used to display the place details, like
+     * region-specific place name, if available.
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+     * Note that 3-digit region codes are not currently supported.
+     * 
+ * + * string region_code = 3; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Unicode country/region code (CLDR) of the location where the
+     * request is coming from. It is used to display the place details, like
+     * region-specific place name, if available.
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+     * Note that 3-digit region codes are not currently supported.
+     * 
+ * + * string region_code = 3; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Unicode country/region code (CLDR) of the location where the
+     * request is coming from. It is used to display the place details, like
+     * region-specific place name, if available.
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+     * Note that 3-digit region codes are not currently supported.
+     * 
+ * + * string region_code = 3; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Unicode country/region code (CLDR) of the location where the
+     * request is coming from. It is used to display the place details, like
+     * region-specific place name, if available.
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+     * Note that 3-digit region codes are not currently supported.
+     * 
+ * + * string region_code = 3; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The Unicode country/region code (CLDR) of the location where the
+     * request is coming from. It is used to display the place details, like
+     * region-specific place name, if available.
+     * For more information, see
+     * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+     * Note that 3-digit region codes are not currently supported.
+     * 
+ * + * string region_code = 3; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int rankPreference_ = 0; + /** + * + * + *
+     * How results will be ranked in the response.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The enum numeric value on the wire for rankPreference. + */ + @java.lang.Override + public int getRankPreferenceValue() { + return rankPreference_; + } + /** + * + * + *
+     * How results will be ranked in the response.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @param value The enum numeric value on the wire for rankPreference to set. + * @return This builder for chaining. + */ + public Builder setRankPreferenceValue(int value) { + rankPreference_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * How results will be ranked in the response.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The rankPreference. + */ + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest.RankPreference getRankPreference() { + com.google.maps.places.v1.SearchTextRequest.RankPreference result = + com.google.maps.places.v1.SearchTextRequest.RankPreference.forNumber(rankPreference_); + return result == null + ? com.google.maps.places.v1.SearchTextRequest.RankPreference.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * How results will be ranked in the response.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @param value The rankPreference to set. + * @return This builder for chaining. + */ + public Builder setRankPreference( + com.google.maps.places.v1.SearchTextRequest.RankPreference value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + rankPreference_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * How results will be ranked in the response.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return This builder for chaining. + */ + public Builder clearRankPreference() { + bitField0_ = (bitField0_ & ~0x00000008); + rankPreference_ = 0; + onChanged(); + return this; + } + + private com.google.maps.places.v1.SearchTextRequest.Location location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.Location, + com.google.maps.places.v1.SearchTextRequest.Location.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder> + locationBuilder_; + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return Whether the location field is set. + */ + @java.lang.Deprecated + public boolean hasLocation() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return The location. + */ + @java.lang.Deprecated + public com.google.maps.places.v1.SearchTextRequest.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null + ? com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance() + : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setLocation(com.google.maps.places.v1.SearchTextRequest.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + } else { + locationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setLocation( + com.google.maps.places.v1.SearchTextRequest.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeLocation(com.google.maps.places.v1.SearchTextRequest.Location value) { + if (locationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && location_ != null + && location_ + != com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); + } else { + location_ = value; + } + } else { + locationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000010); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); + locationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.maps.places.v1.SearchTextRequest.Location.Builder getLocationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null + ? com.google.maps.places.v1.SearchTextRequest.Location.getDefaultInstance() + : location_; + } + } + /** + * + * + *
+     * The region to search. Setting location would usually yields
+     * better results. Recommended to set. This location serves as a bias unless
+     * strict_restriction is set to true, which turns the location to a strict
+     * restriction.
+     * Deprecated.  Use LocationRestriction or LocationBias instead.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.Location, + com.google.maps.places.v1.SearchTextRequest.Location.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.Location, + com.google.maps.places.v1.SearchTextRequest.Location.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder>( + getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object includedType_ = ""; + /** + * + * + *
+     * The requested place type. Full list of types supported:
+     * https://developers.google.com/places/supported_types. Only support one
+     * included type.
+     * 
+ * + * string included_type = 6; + * + * @return The includedType. + */ + public java.lang.String getIncludedType() { + java.lang.Object ref = includedType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + includedType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The requested place type. Full list of types supported:
+     * https://developers.google.com/places/supported_types. Only support one
+     * included type.
+     * 
+ * + * string included_type = 6; + * + * @return The bytes for includedType. + */ + public com.google.protobuf.ByteString getIncludedTypeBytes() { + java.lang.Object ref = includedType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + includedType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The requested place type. Full list of types supported:
+     * https://developers.google.com/places/supported_types. Only support one
+     * included type.
+     * 
+ * + * string included_type = 6; + * + * @param value The includedType to set. + * @return This builder for chaining. + */ + public Builder setIncludedType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + includedType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested place type. Full list of types supported:
+     * https://developers.google.com/places/supported_types. Only support one
+     * included type.
+     * 
+ * + * string included_type = 6; + * + * @return This builder for chaining. + */ + public Builder clearIncludedType() { + includedType_ = getDefaultInstance().getIncludedType(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The requested place type. Full list of types supported:
+     * https://developers.google.com/places/supported_types. Only support one
+     * included type.
+     * 
+ * + * string included_type = 6; + * + * @param value The bytes for includedType to set. + * @return This builder for chaining. + */ + public Builder setIncludedTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + includedType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean openNow_; + /** + * + * + *
+     * Used to restrict the search to places that are open at a specific time.
+     * open_now marks if a business is currently open.
+     * 
+ * + * bool open_now = 7; + * + * @return The openNow. + */ + @java.lang.Override + public boolean getOpenNow() { + return openNow_; + } + /** + * + * + *
+     * Used to restrict the search to places that are open at a specific time.
+     * open_now marks if a business is currently open.
+     * 
+ * + * bool open_now = 7; + * + * @param value The openNow to set. + * @return This builder for chaining. + */ + public Builder setOpenNow(boolean value) { + + openNow_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Used to restrict the search to places that are open at a specific time.
+     * open_now marks if a business is currently open.
+     * 
+ * + * bool open_now = 7; + * + * @return This builder for chaining. + */ + public Builder clearOpenNow() { + bitField0_ = (bitField0_ & ~0x00000040); + openNow_ = false; + onChanged(); + return this; + } + + private com.google.maps.places.v1.Int32Range priceRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Int32Range, + com.google.maps.places.v1.Int32Range.Builder, + com.google.maps.places.v1.Int32RangeOrBuilder> + priceRangeBuilder_; + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return Whether the priceRange field is set. + */ + @java.lang.Deprecated + public boolean hasPriceRange() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return The priceRange. + */ + @java.lang.Deprecated + public com.google.maps.places.v1.Int32Range getPriceRange() { + if (priceRangeBuilder_ == null) { + return priceRange_ == null + ? com.google.maps.places.v1.Int32Range.getDefaultInstance() + : priceRange_; + } else { + return priceRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setPriceRange(com.google.maps.places.v1.Int32Range value) { + if (priceRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + priceRange_ = value; + } else { + priceRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setPriceRange(com.google.maps.places.v1.Int32Range.Builder builderForValue) { + if (priceRangeBuilder_ == null) { + priceRange_ = builderForValue.build(); + } else { + priceRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergePriceRange(com.google.maps.places.v1.Int32Range value) { + if (priceRangeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && priceRange_ != null + && priceRange_ != com.google.maps.places.v1.Int32Range.getDefaultInstance()) { + getPriceRangeBuilder().mergeFrom(value); + } else { + priceRange_ = value; + } + } else { + priceRangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearPriceRange() { + bitField0_ = (bitField0_ & ~0x00000080); + priceRange_ = null; + if (priceRangeBuilder_ != null) { + priceRangeBuilder_.dispose(); + priceRangeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.places.v1.Int32Range.Builder getPriceRangeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getPriceRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.maps.places.v1.Int32RangeOrBuilder getPriceRangeOrBuilder() { + if (priceRangeBuilder_ != null) { + return priceRangeBuilder_.getMessageOrBuilder(); + } else { + return priceRange_ == null + ? com.google.maps.places.v1.Int32Range.getDefaultInstance() + : priceRange_; + } + } + /** + * + * + *
+     * [Deprecated!]Used to restrict the search to places that are within a
+     * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+     * set a maximum of 4 has no effect on the search results. Min price is
+     * default to 0 and max price is default to 4. Default value will be used if
+     * either min or max is unset.
+     * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Int32Range, + com.google.maps.places.v1.Int32Range.Builder, + com.google.maps.places.v1.Int32RangeOrBuilder> + getPriceRangeFieldBuilder() { + if (priceRangeBuilder_ == null) { + priceRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.Int32Range, + com.google.maps.places.v1.Int32Range.Builder, + com.google.maps.places.v1.Int32RangeOrBuilder>( + getPriceRange(), getParentForChildren(), isClean()); + priceRange_ = null; + } + return priceRangeBuilder_; + } + + private double minRating_; + /** + * + * + *
+     * Filter out results whose average user rating is strictly less than this
+     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
+     * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
+     * parity with LocalRefinement_UserRating. 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; + * + * @return The minRating. + */ + @java.lang.Override + public double getMinRating() { + return minRating_; + } + /** + * + * + *
+     * Filter out results whose average user rating is strictly less than this
+     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
+     * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
+     * parity with LocalRefinement_UserRating. 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; + * + * @param value The minRating to set. + * @return This builder for chaining. + */ + public Builder setMinRating(double value) { + + minRating_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter out results whose average user rating is strictly less than this
+     * limit. A valid value must be an float between 0 and 5 (inclusively) at a
+     * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
+     * parity with LocalRefinement_UserRating. 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; + * + * @return This builder for chaining. + */ + public Builder clearMinRating() { + bitField0_ = (bitField0_ & ~0x00000100); + minRating_ = 0D; + onChanged(); + return this; + } + + private int maxResultCount_; + /** + * + * + *
+     * Maximum number of results to return. It must be between 1 and 20,
+     * 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 = 10; + * + * @return The maxResultCount. + */ + @java.lang.Override + public int getMaxResultCount() { + return maxResultCount_; + } + /** + * + * + *
+     * Maximum number of results to return. It must be between 1 and 20,
+     * 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 = 10; + * + * @param value The maxResultCount to set. + * @return This builder for chaining. + */ + public Builder setMaxResultCount(int value) { + + maxResultCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of results to return. It must be between 1 and 20,
+     * 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 = 10; + * + * @return This builder for chaining. + */ + public Builder clearMaxResultCount() { + bitField0_ = (bitField0_ & ~0x00000200); + maxResultCount_ = 0; + onChanged(); + return this; + } + + private java.util.List priceLevels_ = java.util.Collections.emptyList(); + + private void ensurePriceLevelsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + priceLevels_ = new java.util.ArrayList(priceLevels_); + bitField0_ |= 0x00000400; + } + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the priceLevels. + */ + public java.util.List getPriceLevelsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.maps.places.v1.PriceLevel>( + priceLevels_, priceLevels_converter_); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return The count of priceLevels. + */ + public int getPriceLevelsCount() { + return priceLevels_.size(); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + public com.google.maps.places.v1.PriceLevel getPriceLevels(int index) { + return priceLevels_converter_.convert(priceLevels_.get(index)); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index to set the value at. + * @param value The priceLevels to set. + * @return This builder for chaining. + */ + public Builder setPriceLevels(int index, com.google.maps.places.v1.PriceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceLevelsIsMutable(); + priceLevels_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param value The priceLevels to add. + * @return This builder for chaining. + */ + public Builder addPriceLevels(com.google.maps.places.v1.PriceLevel value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceLevelsIsMutable(); + priceLevels_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param values The priceLevels to add. + * @return This builder for chaining. + */ + public Builder addAllPriceLevels( + java.lang.Iterable values) { + ensurePriceLevelsIsMutable(); + for (com.google.maps.places.v1.PriceLevel value : values) { + priceLevels_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return This builder for chaining. + */ + public Builder clearPriceLevels() { + priceLevels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + public java.util.List getPriceLevelsValueList() { + return java.util.Collections.unmodifiableList(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.
+     * 
+ * + * repeated .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of priceLevels at the given index. + */ + public int getPriceLevelsValue(int index) { + return priceLevels_.get(index); + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for priceLevels to set. + * @return This builder for chaining. + */ + public Builder setPriceLevelsValue(int index, int value) { + ensurePriceLevelsIsMutable(); + priceLevels_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param value The enum numeric value on the wire for priceLevels to add. + * @return This builder for chaining. + */ + public Builder addPriceLevelsValue(int value) { + ensurePriceLevelsIsMutable(); + priceLevels_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param values The enum numeric values on the wire for priceLevels to add. + * @return This builder for chaining. + */ + public Builder addAllPriceLevelsValue(java.lang.Iterable values) { + ensurePriceLevelsIsMutable(); + for (int value : values) { + priceLevels_.add(value); + } + onChanged(); + return this; + } + + private boolean 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.
+     * 
+ * + * bool strict_type_filtering = 12; + * + * @return The strictTypeFiltering. + */ + @java.lang.Override + public boolean getStrictTypeFiltering() { + return 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.
+     * 
+ * + * bool strict_type_filtering = 12; + * + * @param value The strictTypeFiltering to set. + * @return This builder for chaining. + */ + public Builder setStrictTypeFiltering(boolean value) { + + strictTypeFiltering_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * 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; + * + * @return This builder for chaining. + */ + public Builder clearStrictTypeFiltering() { + bitField0_ = (bitField0_ & ~0x00000800); + strictTypeFiltering_ = false; + onChanged(); + return this; + } + + private com.google.maps.places.v1.SearchTextRequest.LocationBias locationBias_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationBias, + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder> + locationBiasBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return Whether the locationBias field is set. + */ + public boolean hasLocationBias() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return The locationBias. + */ + public com.google.maps.places.v1.SearchTextRequest.LocationBias getLocationBias() { + if (locationBiasBuilder_ == null) { + return locationBias_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() + : locationBias_; + } else { + return locationBiasBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public Builder setLocationBias(com.google.maps.places.v1.SearchTextRequest.LocationBias value) { + if (locationBiasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationBias_ = value; + } else { + locationBiasBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public Builder setLocationBias( + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder builderForValue) { + if (locationBiasBuilder_ == null) { + locationBias_ = builderForValue.build(); + } else { + locationBiasBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public Builder mergeLocationBias( + com.google.maps.places.v1.SearchTextRequest.LocationBias value) { + if (locationBiasBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && locationBias_ != null + && locationBias_ + != com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance()) { + getLocationBiasBuilder().mergeFrom(value); + } else { + locationBias_ = value; + } + } else { + locationBiasBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public Builder clearLocationBias() { + bitField0_ = (bitField0_ & ~0x00001000); + locationBias_ = null; + if (locationBiasBuilder_ != null) { + locationBiasBuilder_.dispose(); + locationBiasBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder + getLocationBiasBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getLocationBiasFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + public com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder + getLocationBiasOrBuilder() { + if (locationBiasBuilder_ != null) { + return locationBiasBuilder_.getMessageOrBuilder(); + } else { + return locationBias_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationBias.getDefaultInstance() + : 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationBias, + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder> + getLocationBiasFieldBuilder() { + if (locationBiasBuilder_ == null) { + locationBiasBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationBias, + com.google.maps.places.v1.SearchTextRequest.LocationBias.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder>( + getLocationBias(), getParentForChildren(), isClean()); + locationBias_ = null; + } + return locationBiasBuilder_; + } + + private com.google.maps.places.v1.SearchTextRequest.LocationRestriction locationRestriction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationRestriction, + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder> + locationRestrictionBuilder_; + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return Whether the locationRestriction field is set. + */ + public boolean hasLocationRestriction() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return The locationRestriction. + */ + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction + getLocationRestriction() { + if (locationRestrictionBuilder_ == null) { + return locationRestriction_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() + : locationRestriction_; + } else { + return locationRestrictionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public Builder setLocationRestriction( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction value) { + if (locationRestrictionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationRestriction_ = value; + } else { + locationRestrictionBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public Builder setLocationRestriction( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder builderForValue) { + if (locationRestrictionBuilder_ == null) { + locationRestriction_ = builderForValue.build(); + } else { + locationRestrictionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public Builder mergeLocationRestriction( + com.google.maps.places.v1.SearchTextRequest.LocationRestriction value) { + if (locationRestrictionBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && locationRestriction_ != null + && locationRestriction_ + != com.google.maps.places.v1.SearchTextRequest.LocationRestriction + .getDefaultInstance()) { + getLocationRestrictionBuilder().mergeFrom(value); + } else { + locationRestriction_ = value; + } + } else { + locationRestrictionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public Builder clearLocationRestriction() { + bitField0_ = (bitField0_ & ~0x00002000); + locationRestriction_ = null; + if (locationRestrictionBuilder_ != null) { + locationRestrictionBuilder_.dispose(); + locationRestrictionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder + getLocationRestrictionBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getLocationRestrictionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + public com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder + getLocationRestrictionOrBuilder() { + if (locationRestrictionBuilder_ != null) { + return locationRestrictionBuilder_.getMessageOrBuilder(); + } else { + return locationRestriction_ == null + ? com.google.maps.places.v1.SearchTextRequest.LocationRestriction.getDefaultInstance() + : 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.
+     * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationRestriction, + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder> + getLocationRestrictionFieldBuilder() { + if (locationRestrictionBuilder_ == null) { + locationRestrictionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.maps.places.v1.SearchTextRequest.LocationRestriction, + com.google.maps.places.v1.SearchTextRequest.LocationRestriction.Builder, + com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder>( + getLocationRestriction(), getParentForChildren(), isClean()); + locationRestriction_ = null; + } + return locationRestrictionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchTextRequest) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextRequest) + private static final com.google.maps.places.v1.SearchTextRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextRequest(); + } + + public static com.google.maps.places.v1.SearchTextRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTextRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java new file mode 100644 index 000000000000..c8dcdb101a6a --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java @@ -0,0 +1,506 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +public interface SearchTextRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The text query for textual search.
+   * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textQuery. + */ + java.lang.String getTextQuery(); + /** + * + * + *
+   * Required. The text query for textual search.
+   * 
+ * + * string text_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textQuery. + */ + com.google.protobuf.ByteString getTextQueryBytes(); + + /** + * + * + *
+   * 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; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * 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; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * The Unicode country/region code (CLDR) of the location where the
+   * request is coming from. It is used to display the place details, like
+   * region-specific place name, if available.
+   * For more information, see
+   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+   * Note that 3-digit region codes are not currently supported.
+   * 
+ * + * string region_code = 3; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * The Unicode country/region code (CLDR) of the location where the
+   * request is coming from. It is used to display the place details, like
+   * region-specific place name, if available.
+   * For more information, see
+   * http://www.unicode.org/reports/tr35/#unicode_region_subtag.
+   * Note that 3-digit region codes are not currently supported.
+   * 
+ * + * string region_code = 3; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * How results will be ranked in the response.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The enum numeric value on the wire for rankPreference. + */ + int getRankPreferenceValue(); + /** + * + * + *
+   * How results will be ranked in the response.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.RankPreference rank_preference = 4; + * + * @return The rankPreference. + */ + com.google.maps.places.v1.SearchTextRequest.RankPreference getRankPreference(); + + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return Whether the location field is set. + */ + @java.lang.Deprecated + boolean hasLocation(); + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + * + * @deprecated google.maps.places.v1.SearchTextRequest.location is deprecated. See + * google/maps/places/v1/places_service.proto;l=141 + * @return The location. + */ + @java.lang.Deprecated + com.google.maps.places.v1.SearchTextRequest.Location getLocation(); + /** + * + * + *
+   * The region to search. Setting location would usually yields
+   * better results. Recommended to set. This location serves as a bias unless
+   * strict_restriction is set to true, which turns the location to a strict
+   * restriction.
+   * Deprecated.  Use LocationRestriction or LocationBias instead.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.Location location = 5 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.maps.places.v1.SearchTextRequest.LocationOrBuilder getLocationOrBuilder(); + + /** + * + * + *
+   * The requested place type. Full list of types supported:
+   * https://developers.google.com/places/supported_types. Only support one
+   * included type.
+   * 
+ * + * string included_type = 6; + * + * @return The includedType. + */ + java.lang.String getIncludedType(); + /** + * + * + *
+   * The requested place type. Full list of types supported:
+   * https://developers.google.com/places/supported_types. Only support one
+   * included type.
+   * 
+ * + * string included_type = 6; + * + * @return The bytes for includedType. + */ + com.google.protobuf.ByteString getIncludedTypeBytes(); + + /** + * + * + *
+   * Used to restrict the search to places that are open at a specific time.
+   * open_now marks if a business is currently open.
+   * 
+ * + * bool open_now = 7; + * + * @return The openNow. + */ + boolean getOpenNow(); + + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return Whether the priceRange field is set. + */ + @java.lang.Deprecated + boolean hasPriceRange(); + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + * + * @deprecated google.maps.places.v1.SearchTextRequest.price_range is deprecated. See + * google/maps/places/v1/places_service.proto;l=157 + * @return The priceRange. + */ + @java.lang.Deprecated + com.google.maps.places.v1.Int32Range getPriceRange(); + /** + * + * + *
+   * [Deprecated!]Used to restrict the search to places that are within a
+   * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or
+   * set a maximum of 4 has no effect on the search results. Min price is
+   * default to 0 and max price is default to 4. Default value will be used if
+   * either min or max is unset.
+   * 
+ * + * .google.maps.places.v1.Int32Range price_range = 8 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.maps.places.v1.Int32RangeOrBuilder getPriceRangeOrBuilder(); + + /** + * + * + *
+   * Filter out results whose average user rating is strictly less than this
+   * limit. A valid value must be an float between 0 and 5 (inclusively) at a
+   * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep
+   * parity with LocalRefinement_UserRating. 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; + * + * @return The minRating. + */ + double getMinRating(); + + /** + * + * + *
+   * Maximum number of results to return. It must be between 1 and 20,
+   * 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 = 10; + * + * @return The maxResultCount. + */ + int getMaxResultCount(); + + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the priceLevels. + */ + java.util.List getPriceLevelsList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return The count of priceLevels. + */ + int getPriceLevelsCount(); + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the element to return. + * @return The priceLevels at the given index. + */ + com.google.maps.places.v1.PriceLevel getPriceLevels(int index); + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @return A list containing the enum numeric values on the wire for priceLevels. + */ + java.util.List getPriceLevelsValueList(); + /** + * + * + *
+   * 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 .google.maps.places.v1.PriceLevel price_levels = 11; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of priceLevels at the given index. + */ + int getPriceLevelsValue(int index); + + /** + * + * + *
+   * 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; + * + * @return The strictTypeFiltering. + */ + boolean getStrictTypeFiltering(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return Whether the locationBias field is set. + */ + boolean hasLocationBias(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + * + * @return The locationBias. + */ + com.google.maps.places.v1.SearchTextRequest.LocationBias getLocationBias(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationBias location_bias = 13; + */ + com.google.maps.places.v1.SearchTextRequest.LocationBiasOrBuilder getLocationBiasOrBuilder(); + + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return Whether the locationRestriction field is set. + */ + boolean hasLocationRestriction(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + * + * @return The locationRestriction. + */ + com.google.maps.places.v1.SearchTextRequest.LocationRestriction getLocationRestriction(); + /** + * + * + *
+   * 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.
+   * 
+ * + * .google.maps.places.v1.SearchTextRequest.LocationRestriction location_restriction = 14; + * + */ + com.google.maps.places.v1.SearchTextRequest.LocationRestrictionOrBuilder + getLocationRestrictionOrBuilder(); +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java new file mode 100644 index 000000000000..17fbba6c4204 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java @@ -0,0 +1,934 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +/** + * + * + *
+ * Response proto for SearchText.
+ * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextResponse} + */ +public final class SearchTextResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.maps.places.v1.SearchTextResponse) + SearchTextResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTextResponse.newBuilder() to construct. + private SearchTextResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTextResponse() { + places_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTextResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextResponse.class, + com.google.maps.places.v1.SearchTextResponse.Builder.class); + } + + public static final int PLACES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List places_; + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + @java.lang.Override + public java.util.List getPlacesList() { + return places_; + } + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + @java.lang.Override + public java.util.List + getPlacesOrBuilderList() { + return places_; + } + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + @java.lang.Override + public int getPlacesCount() { + return places_.size(); + } + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + @java.lang.Override + public com.google.maps.places.v1.Place getPlaces(int index) { + return places_.get(index); + } + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + @java.lang.Override + public com.google.maps.places.v1.PlaceOrBuilder getPlacesOrBuilder(int index) { + return places_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < places_.size(); i++) { + output.writeMessage(1, places_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < places_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, places_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.maps.places.v1.SearchTextResponse)) { + return super.equals(obj); + } + com.google.maps.places.v1.SearchTextResponse other = + (com.google.maps.places.v1.SearchTextResponse) obj; + + if (!getPlacesList().equals(other.getPlacesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPlacesCount() > 0) { + hash = (37 * hash) + PLACES_FIELD_NUMBER; + hash = (53 * hash) + getPlacesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.maps.places.v1.SearchTextResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.maps.places.v1.SearchTextResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response proto for SearchText.
+   * 
+ * + * Protobuf type {@code google.maps.places.v1.SearchTextResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.maps.places.v1.SearchTextResponse) + com.google.maps.places.v1.SearchTextResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.maps.places.v1.SearchTextResponse.class, + com.google.maps.places.v1.SearchTextResponse.Builder.class); + } + + // Construct using com.google.maps.places.v1.SearchTextResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (placesBuilder_ == null) { + places_ = java.util.Collections.emptyList(); + } else { + places_ = null; + placesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.maps.places.v1.PlacesServiceProto + .internal_static_google_maps_places_v1_SearchTextResponse_descriptor; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextResponse getDefaultInstanceForType() { + return com.google.maps.places.v1.SearchTextResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextResponse build() { + com.google.maps.places.v1.SearchTextResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextResponse buildPartial() { + com.google.maps.places.v1.SearchTextResponse result = + new com.google.maps.places.v1.SearchTextResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.maps.places.v1.SearchTextResponse result) { + if (placesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + places_ = java.util.Collections.unmodifiableList(places_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.places_ = places_; + } else { + result.places_ = placesBuilder_.build(); + } + } + + private void buildPartial0(com.google.maps.places.v1.SearchTextResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.maps.places.v1.SearchTextResponse) { + return mergeFrom((com.google.maps.places.v1.SearchTextResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.maps.places.v1.SearchTextResponse other) { + if (other == com.google.maps.places.v1.SearchTextResponse.getDefaultInstance()) return this; + if (placesBuilder_ == null) { + if (!other.places_.isEmpty()) { + if (places_.isEmpty()) { + places_ = other.places_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlacesIsMutable(); + places_.addAll(other.places_); + } + onChanged(); + } + } else { + if (!other.places_.isEmpty()) { + if (placesBuilder_.isEmpty()) { + placesBuilder_.dispose(); + placesBuilder_ = null; + places_ = other.places_; + bitField0_ = (bitField0_ & ~0x00000001); + placesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlacesFieldBuilder() + : null; + } else { + placesBuilder_.addAllMessages(other.places_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.maps.places.v1.Place m = + input.readMessage(com.google.maps.places.v1.Place.parser(), extensionRegistry); + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + places_.add(m); + } else { + placesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List places_ = + java.util.Collections.emptyList(); + + private void ensurePlacesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + places_ = new java.util.ArrayList(places_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place, + com.google.maps.places.v1.Place.Builder, + com.google.maps.places.v1.PlaceOrBuilder> + placesBuilder_; + + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public java.util.List getPlacesList() { + if (placesBuilder_ == null) { + return java.util.Collections.unmodifiableList(places_); + } else { + return placesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public int getPlacesCount() { + if (placesBuilder_ == null) { + return places_.size(); + } else { + return placesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public com.google.maps.places.v1.Place getPlaces(int index) { + if (placesBuilder_ == null) { + return places_.get(index); + } else { + return placesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder setPlaces(int index, com.google.maps.places.v1.Place value) { + if (placesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlacesIsMutable(); + places_.set(index, value); + onChanged(); + } else { + placesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder setPlaces(int index, com.google.maps.places.v1.Place.Builder builderForValue) { + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + places_.set(index, builderForValue.build()); + onChanged(); + } else { + placesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder addPlaces(com.google.maps.places.v1.Place value) { + if (placesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlacesIsMutable(); + places_.add(value); + onChanged(); + } else { + placesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder addPlaces(int index, com.google.maps.places.v1.Place value) { + if (placesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlacesIsMutable(); + places_.add(index, value); + onChanged(); + } else { + placesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder addPlaces(com.google.maps.places.v1.Place.Builder builderForValue) { + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + places_.add(builderForValue.build()); + onChanged(); + } else { + placesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder addPlaces(int index, com.google.maps.places.v1.Place.Builder builderForValue) { + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + places_.add(index, builderForValue.build()); + onChanged(); + } else { + placesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder addAllPlaces( + java.lang.Iterable values) { + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, places_); + onChanged(); + } else { + placesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder clearPlaces() { + if (placesBuilder_ == null) { + places_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + placesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public Builder removePlaces(int index) { + if (placesBuilder_ == null) { + ensurePlacesIsMutable(); + places_.remove(index); + onChanged(); + } else { + placesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public com.google.maps.places.v1.Place.Builder getPlacesBuilder(int index) { + return getPlacesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public com.google.maps.places.v1.PlaceOrBuilder getPlacesOrBuilder(int index) { + if (placesBuilder_ == null) { + return places_.get(index); + } else { + return placesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public java.util.List + getPlacesOrBuilderList() { + if (placesBuilder_ != null) { + return placesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(places_); + } + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public com.google.maps.places.v1.Place.Builder addPlacesBuilder() { + return getPlacesFieldBuilder() + .addBuilder(com.google.maps.places.v1.Place.getDefaultInstance()); + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public com.google.maps.places.v1.Place.Builder addPlacesBuilder(int index) { + return getPlacesFieldBuilder() + .addBuilder(index, com.google.maps.places.v1.Place.getDefaultInstance()); + } + /** + * + * + *
+     * A list of places that meet the user's text search criteria.
+     * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + public java.util.List getPlacesBuilderList() { + return getPlacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place, + com.google.maps.places.v1.Place.Builder, + com.google.maps.places.v1.PlaceOrBuilder> + getPlacesFieldBuilder() { + if (placesBuilder_ == null) { + placesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.maps.places.v1.Place, + com.google.maps.places.v1.Place.Builder, + com.google.maps.places.v1.PlaceOrBuilder>( + places_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + places_ = null; + } + return placesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.maps.places.v1.SearchTextResponse) + } + + // @@protoc_insertion_point(class_scope:google.maps.places.v1.SearchTextResponse) + private static final com.google.maps.places.v1.SearchTextResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.maps.places.v1.SearchTextResponse(); + } + + public static com.google.maps.places.v1.SearchTextResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTextResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.maps.places.v1.SearchTextResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java new file mode 100644 index 000000000000..323c0cd6654c --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/maps/places/v1/places_service.proto + +package com.google.maps.places.v1; + +public interface SearchTextResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.maps.places.v1.SearchTextResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + java.util.List getPlacesList(); + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + com.google.maps.places.v1.Place getPlaces(int index); + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + int getPlacesCount(); + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + java.util.List getPlacesOrBuilderList(); + /** + * + * + *
+   * A list of places that meet the user's text search criteria.
+   * 
+ * + * repeated .google.maps.places.v1.Place places = 1; + */ + com.google.maps.places.v1.PlaceOrBuilder getPlacesOrBuilder(int index); +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/geometry.proto b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/geometry.proto new file mode 100644 index 000000000000..9823c89d93a4 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/geometry.proto @@ -0,0 +1,42 @@ +// Copyright 2023 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 = "google.golang.org/genproto/googleapis/maps/places/v1;places"; +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/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto new file mode 100644 index 000000000000..2a20e906fc2b --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/place.proto @@ -0,0 +1,424 @@ +// Copyright 2023 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/geo/type/viewport.proto"; +import "google/protobuf/timestamp.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 = "google.golang.org/genproto/googleapis/maps/places/v1;places"; +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 { + // 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 a review of the place. + message Review { + // Timestamp for the review, expressed in seconds since epoch. + google.protobuf.Timestamp publish_time = 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 name of the review author. + string author = 4; + + // A link to the review author's profile. + string author_uri = 5; + + // The author's profile photo. + string author_photo_uri = 6; + + // A whole number between 1.0 and 5.0, a.k.a. the number of stars. + double rating = 7; + + // A BCP-47 language code indicating the original language of the review. + // If the review has been translated, then original_language != language. + // This field contains the main language tag only, and not the secondary tag + // indicating country or region. For example, all the English reviews are + // tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty + // if there is only a rating with no review text. + string original_language_code = 10; + + // A boolean value indicating if the review was translated from the original + // language it was written in. If a review has been translated, + // corresponding to a value of true, Google recommends that you indicate + // this to your users. For example, you can add the following string, + // “Translated by Google”, to the review. + bool translated = 11; + } + + // Information about business hour of the place. + message OpeningHours { + // A period the place remains in open_now status. + message OpeningHoursPeriod { + // Status changing points. + message OpeningHoursPoint { + // 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 of the endpoint expressed in `RFC3339` format in the local + // timezone for the place. For example 2010-12-31. + string date_deprecated = 4 [deprecated = true]; + + // 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. + OpeningHoursPoint open = 1; + + // The time that the place starts to be closed. + OpeningHoursPoint close = 2; + } + + // A type used to identify the type of secondary hours. + enum SecondaryHourType { + // Default value when secondary hour type is not specified. + SECONDARY_HOUR_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. + 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 OpeningHoursPeriod 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. + SecondaryHourType secondary_hour_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; + } + + // Contains a summary of the place. + message EditorialSummary { + // 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 overview = 1; + } + + // Required. The unique identifier of a place. + string id = 2 [(google.api.field_behavior) = REQUIRED]; + + // 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". + repeated string types = 5; + + // 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; + + // Repeated components for each locality level. + 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. + repeated Review reviews = 20; + + // The regular hours of operation. + OpeningHours 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. + int32 utc_offset_minutes = 22; + + // 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. + int32 user_rating_count = 28; + + // A truncated URL to an v2 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 has an entrance that is wheelchair-accessible. + optional bool wheelchair_accessible_entrance = 37; + + // 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 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. + EditorialSummary editorial_summary = 48; +} + +// Price level of the place. +enum PriceLevel { + // Place price level is unspecified or unknown. + PRICE_LEVEL_UNSPECIFIED = 0; + + FREE = 1; + + // Place provides inexpensive services. + INEXPENSIVE = 2; + + // Place provides moderately priced services. + MODERATE = 3; + + // Place provides expensive services. + EXPENSIVE = 4; + + // Place provides very expensive services. + VERY_EXPENSIVE = 5; +} diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto new file mode 100644 index 000000000000..d6f7a197cd44 --- /dev/null +++ b/java-maps-places/proto-google-maps-places-v1/src/main/proto/google/maps/places/v1/places_service.proto @@ -0,0 +1,199 @@ +// Copyright 2023 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/geo/type/viewport.proto"; +import "google/maps/places/v1/geometry.proto"; +import "google/maps/places/v1/place.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "google.golang.org/genproto/googleapis/maps/places/v1;places"; +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. +service Places { + option (google.api.default_host) = "places.googleapis.com"; + + // Text query based place search. + rpc SearchText(SearchTextRequest) returns (SearchTextResponse) { + option (google.api.http) = { + post: "/v1/Text:search" + body: "*" + }; + } +} + +// int 32 range. Both min and max are optional. If only min is set, then the +// range only has a lower bound. If only max is set, then range only has an +// upper bound. At least one of min and max must be set. Values are inclusive. +message Int32Range { + // Lower bound. If unset, behavior is documented on the range field. + optional int32 min = 1; + + // Upper bound. If unset, behavior is documented on the range field. + optional int32 max = 2; +} + +// Request data structure for SearchText. +message SearchTextRequest { + // How results will be ranked in the response. + enum RankPreference { + // RankPreference value not set. Will default to DISTANCE. + RANK_PREFERENCE_UNSPECIFIED = 0; + + // Ranks results by distance. + DISTANCE = 1; + + // Ranks results by relevance. Sort order determined by normal ranking + // stack. See SortRefinement::RELEVANCE. + RELEVANCE = 2; + } + + // The region to search. + // + // Deprecated. Use LocationRestriction or LocationBias instead. + message Location { + oneof type { + // A rectangle box defined by northeast and southwest corner. + google.geo.type.Viewport rectangle = 1; + } + + // Make location field a strict restriction and filter out POIs outside of + // the given location. If location type field is unset this field will have + // no effect. + bool strict_restriction = 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. + 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. + google.geo.type.Viewport rectangle = 1; + } + } + + // 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. It is used to display the place details, like + // region-specific place name, if available. + // + // For more information, see + // http://www.unicode.org/reports/tr35/#unicode_region_subtag. + // + // + // 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 region to search. Setting location would usually yields + // better results. Recommended to set. This location serves as a bias unless + // strict_restriction is set to true, which turns the location to a strict + // restriction. + // + // Deprecated. Use LocationRestriction or LocationBias instead. + Location location = 5 [deprecated = true]; + + // The requested place type. Full list of types supported: + // https://developers.google.com/places/supported_types. Only support one + // included type. + string included_type = 6; + + // Used to restrict the search to places that are open at a specific time. + // open_now marks if a business is currently open. + bool open_now = 7; + + // [Deprecated!]Used to restrict the search to places that are within a + // certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or + // set a maximum of 4 has no effect on the search results. Min price is + // default to 0 and max price is default to 4. Default value will be used if + // either min or max is unset. + Int32Range price_range = 8 [deprecated = true]; + + // Filter out results whose average user rating is strictly less than this + // limit. A valid value must be an float between 0 and 5 (inclusively) at a + // 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep + // parity with LocalRefinement_UserRating. 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. 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; +} + +// Response proto for SearchText. +// +message SearchTextResponse { + // A list of places that meet the user's text search criteria. + repeated Place places = 1; +} diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b26aff60de07 --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_Places_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.maps.places.v1.PlacesClient; +import com.google.maps.places.v1.PlacesSettings; +import com.google.maps.places.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PlacesSettings placesSettings = + PlacesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PlacesClient placesClient = PlacesClient.create(placesSettings); + } +} +// [END places_v1_generated_Places_Create_SetCredentialsProvider_sync] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..af44fd77f6ab --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_Places_Create_SetCredentialsProvider1_sync] +import com.google.maps.places.v1.PlacesClient; +import com.google.maps.places.v1.PlacesSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PlacesSettings placesSettings = PlacesSettings.newHttpJsonBuilder().build(); + PlacesClient placesClient = PlacesClient.create(placesSettings); + } +} +// [END places_v1_generated_Places_Create_SetCredentialsProvider1_sync] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..813b46a8b0dd --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_Places_Create_SetEndpoint_sync] +import com.google.maps.places.v1.PlacesClient; +import com.google.maps.places.v1.PlacesSettings; +import com.google.maps.places.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PlacesSettings placesSettings = PlacesSettings.newBuilder().setEndpoint(myEndpoint).build(); + PlacesClient placesClient = PlacesClient.create(placesSettings); + } +} +// [END places_v1_generated_Places_Create_SetEndpoint_sync] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java new file mode 100644 index 000000000000..112bf5cfabd5 --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java @@ -0,0 +1,63 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_Places_SearchText_async] +import com.google.api.core.ApiFuture; +import com.google.maps.places.v1.Int32Range; +import com.google.maps.places.v1.PlacesClient; +import com.google.maps.places.v1.PriceLevel; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import java.util.ArrayList; + +public class AsyncSearchText { + + public static void main(String[] args) throws Exception { + asyncSearchText(); + } + + public static void asyncSearchText() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PlacesClient placesClient = PlacesClient.create()) { + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + ApiFuture future = placesClient.searchTextCallable().futureCall(request); + // Do something. + SearchTextResponse response = future.get(); + } + } +} +// [END places_v1_generated_Places_SearchText_async] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java new file mode 100644 index 000000000000..f1ff9d5565d6 --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_Places_SearchText_sync] +import com.google.maps.places.v1.Int32Range; +import com.google.maps.places.v1.PlacesClient; +import com.google.maps.places.v1.PriceLevel; +import com.google.maps.places.v1.SearchTextRequest; +import com.google.maps.places.v1.SearchTextResponse; +import java.util.ArrayList; + +public class SyncSearchText { + + public static void main(String[] args) throws Exception { + syncSearchText(); + } + + public static void syncSearchText() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PlacesClient placesClient = PlacesClient.create()) { + SearchTextRequest request = + SearchTextRequest.newBuilder() + .setTextQuery("textQuery-1050470501") + .setLanguageCode("languageCode-2092349083") + .setRegionCode("regionCode-1991004415") + .setLocation(SearchTextRequest.Location.newBuilder().build()) + .setIncludedType("includedType-45971946") + .setOpenNow(true) + .setPriceRange(Int32Range.newBuilder().build()) + .setMinRating(-543315926) + .setMaxResultCount(-1736124056) + .addAllPriceLevels(new ArrayList()) + .setStrictTypeFiltering(true) + .setLocationBias(SearchTextRequest.LocationBias.newBuilder().build()) + .setLocationRestriction(SearchTextRequest.LocationRestriction.newBuilder().build()) + .build(); + SearchTextResponse response = placesClient.searchText(request); + } + } +} +// [END places_v1_generated_Places_SearchText_sync] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java new file mode 100644 index 000000000000..d08b1c87b1e3 --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.samples; + +// [START places_v1_generated_PlacesSettings_SearchText_sync] +import com.google.maps.places.v1.PlacesSettings; +import java.time.Duration; + +public class SyncSearchText { + + public static void main(String[] args) throws Exception { + syncSearchText(); + } + + public static void syncSearchText() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PlacesSettings.Builder placesSettingsBuilder = PlacesSettings.newBuilder(); + placesSettingsBuilder + .searchTextSettings() + .setRetrySettings( + placesSettingsBuilder + .searchTextSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PlacesSettings placesSettings = placesSettingsBuilder.build(); + } +} +// [END places_v1_generated_PlacesSettings_SearchText_sync] diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java new file mode 100644 index 000000000000..28751c6cc7eb --- /dev/null +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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. + */ + +package com.google.maps.places.v1.stub.samples; + +// [START places_v1_generated_PlacesStubSettings_SearchText_sync] +import com.google.maps.places.v1.stub.PlacesStubSettings; +import java.time.Duration; + +public class SyncSearchText { + + public static void main(String[] args) throws Exception { + syncSearchText(); + } + + public static void syncSearchText() throws Exception { + // 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. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PlacesStubSettings.Builder placesSettingsBuilder = PlacesStubSettings.newBuilder(); + placesSettingsBuilder + .searchTextSettings() + .setRetrySettings( + placesSettingsBuilder + .searchTextSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PlacesStubSettings placesSettings = placesSettingsBuilder.build(); + } +} +// [END places_v1_generated_PlacesStubSettings_SearchText_sync] diff --git a/pom.xml b/pom.xml index 810d25f60131..134230ff3453 100644 --- a/pom.xml +++ b/pom.xml @@ -107,6 +107,7 @@ java-managed-identities java-maps-addressvalidation java-maps-mapsplatformdatasets + java-maps-places java-maps-routing java-mediatranslation java-memcache diff --git a/versions.txt b/versions.txt index 3a0e8c81e091..52d7e73960f1 100644 --- a/versions.txt +++ b/versions.txt @@ -643,3 +643,6 @@ grpc-google-cloud-storageinsights-v1:0.1.0:0.2.0-SNAPSHOT google-cloud-cloudsupport:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-cloudsupport-v2:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-cloudsupport-v2:0.0.0:0.0.1-SNAPSHOT +google-maps-places:0.0.0:0.0.1-SNAPSHOT +proto-google-maps-places-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-maps-places-v1:0.0.0:0.0.1-SNAPSHOT From e9c95449af96e6cf17cba85413ba3cb340856026 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 9 May 2023 20:16:23 +0000 Subject: [PATCH 2/6] =?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 --- java-maps-places/google-maps-places-bom/pom.xml | 2 +- java-maps-places/google-maps-places/pom.xml | 4 ++-- java-maps-places/pom.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/java-maps-places/google-maps-places-bom/pom.xml b/java-maps-places/google-maps-places-bom/pom.xml index 35a0b65fce05..9c02c2aeb849 100644 --- a/java-maps-places/google-maps-places-bom/pom.xml +++ b/java-maps-places/google-maps-places-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.maps diff --git a/java-maps-places/google-maps-places/pom.xml b/java-maps-places/google-maps-places/pom.xml index 5ada70ef3993..674112c7f926 100644 --- a/java-maps-places/google-maps-places/pom.xml +++ b/java-maps-places/google-maps-places/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.maps @@ -111,4 +111,4 @@ test - \ No newline at end of file + diff --git a/java-maps-places/pom.xml b/java-maps-places/pom.xml index e06b213158a6..f21fe2133abd 100644 --- a/java-maps-places/pom.xml +++ b/java-maps-places/pom.xml @@ -50,4 +50,5 @@ proto-google-maps-places-v1 google-maps-places-bom - + + From f48d9c99cf74498e8446b59f8c5de962d9c1ac62 Mon Sep 17 00:00:00 2001 From: Alice Li Date: Wed, 10 May 2023 10:10:15 -0400 Subject: [PATCH 3/6] remove newline --- java-maps-places/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-maps-places/.repo-metadata.json b/java-maps-places/.repo-metadata.json index 9e7db117441b..273a3b4a1e97 100644 --- a/java-maps-places/.repo-metadata.json +++ b/java-maps-places/.repo-metadata.json @@ -2,7 +2,7 @@ "api_shortname": "maps-places", "name_pretty": "Places API (New)", "product_documentation": "https://developers.google.com/maps/documentation/places/web-service/", - "api_description": "The Places API allows developers to access a variety of search and\n retrieval endpoints for a Place.", + "api_description": "The Places API allows developers to access a variety of search and retrieval endpoints for a Place.", "client_documentation": "https://cloud.google.com/java/docs/reference/google-maps-places/latest/overview", "release_level": "preview", "transport": "grpc", From 1e700aab4649128699d4166bc78550270b28a985 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Thu, 2 Nov 2023 20:01:10 -0400 Subject: [PATCH 4/6] change parent version --- java-maps-places/google-maps-places-bom/pom.xml | 2 +- java-maps-places/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java-maps-places/google-maps-places-bom/pom.xml b/java-maps-places/google-maps-places-bom/pom.xml index 9c02c2aeb849..d4517a0496ed 100644 --- a/java-maps-places/google-maps-places-bom/pom.xml +++ b/java-maps-places/google-maps-places-bom/pom.xml @@ -9,7 +9,7 @@ com.google.cloud google-cloud-pom-parent - 1.11.0-SNAPSHOT + 1.24.0-SNAPSHOT ../../google-cloud-pom-parent/pom.xml diff --git a/java-maps-places/pom.xml b/java-maps-places/pom.xml index f21fe2133abd..f6941078c636 100644 --- a/java-maps-places/pom.xml +++ b/java-maps-places/pom.xml @@ -13,7 +13,7 @@ com.google.cloud google-cloud-jar-parent - 1.11.0-SNAPSHOT + 1.24.0-SNAPSHOT ../google-cloud-jar-parent/pom.xml From 8ec2db8a3ccee1682fcc0555426d94cfc4f29926 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Fri, 3 Nov 2023 10:12:09 -0400 Subject: [PATCH 5/6] change header --- .../src/main/java/com/google/maps/places/v1/PlacesClient.java | 2 +- .../src/main/java/com/google/maps/places/v1/PlacesSettings.java | 2 +- .../src/main/java/com/google/maps/places/v1/package-info.java | 2 +- .../google/maps/places/v1/stub/GrpcPlacesCallableFactory.java | 2 +- .../java/com/google/maps/places/v1/stub/GrpcPlacesStub.java | 2 +- .../maps/places/v1/stub/HttpJsonPlacesCallableFactory.java | 2 +- .../java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java | 2 +- .../main/java/com/google/maps/places/v1/stub/PlacesStub.java | 2 +- .../java/com/google/maps/places/v1/stub/PlacesStubSettings.java | 2 +- .../src/test/java/com/google/maps/places/v1/MockPlaces.java | 2 +- .../src/test/java/com/google/maps/places/v1/MockPlacesImpl.java | 2 +- .../com/google/maps/places/v1/PlacesClientHttpJsonTest.java | 2 +- .../test/java/com/google/maps/places/v1/PlacesClientTest.java | 2 +- .../src/main/java/com/google/maps/places/v1/PlacesGrpc.java | 2 +- .../src/main/java/com/google/maps/places/v1/Circle.java | 2 +- .../main/java/com/google/maps/places/v1/CircleOrBuilder.java | 2 +- .../src/main/java/com/google/maps/places/v1/GeometryProto.java | 2 +- .../src/main/java/com/google/maps/places/v1/Int32Range.java | 2 +- .../java/com/google/maps/places/v1/Int32RangeOrBuilder.java | 2 +- .../src/main/java/com/google/maps/places/v1/Place.java | 2 +- .../src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java | 2 +- .../src/main/java/com/google/maps/places/v1/PlaceProto.java | 2 +- .../main/java/com/google/maps/places/v1/PlacesServiceProto.java | 2 +- .../src/main/java/com/google/maps/places/v1/PriceLevel.java | 2 +- .../main/java/com/google/maps/places/v1/SearchTextRequest.java | 2 +- .../com/google/maps/places/v1/SearchTextRequestOrBuilder.java | 2 +- .../main/java/com/google/maps/places/v1/SearchTextResponse.java | 2 +- .../com/google/maps/places/v1/SearchTextResponseOrBuilder.java | 2 +- .../v1/places/create/SyncCreateSetCredentialsProvider.java | 2 +- .../v1/places/create/SyncCreateSetCredentialsProvider1.java | 2 +- .../maps/places/v1/places/create/SyncCreateSetEndpoint.java | 2 +- .../maps/places/v1/places/searchtext/AsyncSearchText.java | 2 +- .../google/maps/places/v1/places/searchtext/SyncSearchText.java | 2 +- .../places/v1/placessettings/searchtext/SyncSearchText.java | 2 +- .../v1/stub/placesstubsettings/searchtext/SyncSearchText.java | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java index c706c01255fc..e01f7ae647fe 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java index d1a3a95b4415..d31537f0c117 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/PlacesSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java index fdf2fcbd4add..0a2dd69a9bd6 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java index 375d404f0e41..5954f36e2629 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java index 98eb65c8fd26..d41d9ea50c63 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/GrpcPlacesStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java index 6b5d80278a04..06c6474f14e9 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java index 020ec01b771f..d2e38b9f0ca7 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/HttpJsonPlacesStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java index 9a1530939874..9b8f362851b1 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java index 49718da965e8..35c058df3b03 100644 --- a/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java +++ b/java-maps-places/google-maps-places/src/main/java/com/google/maps/places/v1/stub/PlacesStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java index 7c0c055ae115..6bbe6aff9abb 100644 --- a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlaces.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java index 24b9ec2803c8..c1eda4ef4111 100644 --- a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/MockPlacesImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java index c50991fdaaff..14642523373a 100644 --- a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java index 693f6ed518c3..e9483d226539 100644 --- a/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java +++ b/java-maps-places/google-maps-places/src/test/java/com/google/maps/places/v1/PlacesClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java index 145c72942bf9..488105d4411b 100644 --- a/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java +++ b/java-maps-places/grpc-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java index b631438691cd..4d2a618e8bfa 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Circle.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java index e5c7167e30c9..20d1e1d6c098 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/CircleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java index cd3182ae1310..9722949cf5da 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/GeometryProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java index ee1ebb03bb80..d8980f1b6d61 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32Range.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java index 2f69ff021669..7ab695aa9747 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Int32RangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java index 0916b196c9e0..2af713663ae0 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/Place.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java index 7d9fa289e5f6..d850e6136f8f 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java index 5379d57c3132..bf5f2afbfb44 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlaceProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java index 8530edff4ca6..5ffa1ada3750 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PlacesServiceProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java index 81076f1089eb..f26894a05017 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/PriceLevel.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java index 7b95a6c7cab8..2c78321542b4 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java index c8dcdb101a6a..f238afed5a4a 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java index 17fbba6c4204..0430be86b16c 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java index 323c0cd6654c..278ba0340c83 100644 --- a/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java +++ b/java-maps-places/proto-google-maps-places-v1/src/main/java/com/google/maps/places/v1/SearchTextResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java index b26aff60de07..eb86bd5f8ab0 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java index af44fd77f6ab..f81b799b706c 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetCredentialsProvider1.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java index 813b46a8b0dd..ef4cb7750593 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/create/SyncCreateSetEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java index 112bf5cfabd5..72ca40e73dcd 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/AsyncSearchText.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java index f1ff9d5565d6..049418596a5d 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/places/searchtext/SyncSearchText.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java index d08b1c87b1e3..b7ab2ba7b014 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/placessettings/searchtext/SyncSearchText.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java index 28751c6cc7eb..346c3ed707ed 100644 --- a/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java +++ b/java-maps-places/samples/snippets/generated/com/google/maps/places/v1/stub/placesstubsettings/searchtext/SyncSearchText.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From bdde2f57b15b31d430a0c8ab05e57c580d7f4b35 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 3 Nov 2023 14:16:29 +0000 Subject: [PATCH 6/6] =?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 --- java-maps-places/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java-maps-places/README.md b/java-maps-places/README.md index 0c561450d047..83ef86c554ad 100644 --- a/java-maps-places/README.md +++ b/java-maps-places/README.md @@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.14.0 + 26.26.0 pom import @@ -88,8 +88,7 @@ to add `google-maps-places` as a dependency in your code. ## About Places API (New) -[Places API (New)][product-docs] The Places API allows developers to access a variety of search and - retrieval endpoints for a Place. +[Places API (New)][product-docs] The Places API allows developers to access a variety of search and retrieval endpoints for a Place. See the [Places API (New) client library docs][javadocs] to learn how to use this Places API (New) Client Library.